mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
readme: fix the instruction of running next
This commit is contained in:
parent
3d44b58d5d
commit
d9ea4ce312
12
README.md
12
README.md
|
@ -10,6 +10,16 @@ Install it:
|
|||
$ npm install next --save
|
||||
```
|
||||
|
||||
and add a script to your package.json like this:
|
||||
|
||||
```json
|
||||
{
|
||||
"scripts": {
|
||||
"start": "next"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
After that, the file-system is the main API. Every `.js` file becomes a route that gets automatically processed and rendered.
|
||||
|
||||
Populate `./pages/index.js` inside your project:
|
||||
|
@ -21,7 +31,7 @@ export default () => (
|
|||
)
|
||||
```
|
||||
|
||||
and then just run `next` and go to `http://localhost:3000`
|
||||
and then just run `npm start` and go to `http://localhost:3000`
|
||||
|
||||
So far, we get:
|
||||
|
||||
|
|
Loading…
Reference in a new issue