Skip to content

Commit 773cc39

Browse files
committed
Update rest-api example
1 parent c8b7074 commit 773cc39

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

examples/rest-api/README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,21 @@
22

33
This example shows how to build a generic Rest API module for NuclearJS's flux architecture.
44

5-
## Running the example
5+
## Running
66

7-
The built files are already checked in, simply open `index.html` to see the example. Make sure you open the console to see the actions being dispatched.
7+
You must have [npm](https://www.npmjs.org/) installed on your computer.
8+
From the root project directory run these commands from the command line:
89

9-
**To watch/rebuild**
10+
`npm install`
1011

11-
```sh
12-
npm run watch
13-
```
12+
This will install all dependencies.
13+
14+
To build the project, first run this command:
15+
16+
`npm start`
17+
18+
After starting the watcher, you can open `index.html` in your browser to
19+
open the app.
1420

1521
## Architecture
1622

examples/rest-api/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"main": "index.js",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1",
8-
"build": "`npm bin`/webpack --progress --colors",
9-
"watch": "`npm bin`/webpack --watch --progress --colors"
8+
"start": "./node_modules/webpack/bin/webpack.js --watch --progress"
109
},
1110
"author": "",
1211
"license": "ISC",

0 commit comments

Comments
 (0)