Commit d9ea4ce3 authored by nkzawa's avatar nkzawa

readme: fix the instruction of running next

parent 3d44b58d
...@@ -10,6 +10,16 @@ Install it: ...@@ -10,6 +10,16 @@ Install it:
$ npm install next --save $ 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. 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: Populate `./pages/index.js` inside your project:
...@@ -21,7 +31,7 @@ export default () => ( ...@@ -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: So far, we get:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment