Skip to content

Commit 533a1b2

Browse files
committed
npm: Add start:local, start:staging and start:live scripts
The proxy shouldn't be overwritten by default, otherwise ember-cli-mirage and pretender don't work.
1 parent 568d90e commit 533a1b2

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

.ember-cli

-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@
55

66
Setting `disableAnalytics` to true will prevent any data from being sent.
77
*/
8-
"proxy": "http://127.0.0.1:8888/",
98
"disableAnalytics": false
109
}

README.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ which enables tweaking the UI of the site without actually having the server
1717
running locally. To get up and running with just the UI, run:
1818

1919
```
20-
npm run start:ui
20+
npm run start:staging
2121
```
2222

2323
This will give you a local server to browse while using the staging backend
@@ -29,6 +29,12 @@ If you'd like to run the server with a specific different backend, you can speci
2929
npm start -- --proxy https://crates.io
3030
```
3131

32+
The same is also available as:
33+
34+
```
35+
npm run start:live
36+
```
37+
3238
This requires NPM 2.0.
3339

3440
## Working on the backend
@@ -91,7 +97,7 @@ little more complicated.
9197
./target/server
9298
9399
# In another window run the ember-cli server
94-
ember server --proxy http://localhost:8888/
100+
npm run start:local
95101
```
96102
97103
## Running Tests

package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
"test": "tests"
88
},
99
"scripts": {
10-
"start": "ember server",
11-
"start:ui": "ember server --proxy https://staging-crates-io.herokuapp.com",
1210
"build": "ember build",
11+
"start": "ember server",
12+
"start:local": "ember server --proxy http://127.0.0.1:8888",
13+
"start:staging": "ember server --proxy https://staging-crates-io.herokuapp.com",
14+
"start:live": "ember server --proxy https://crates.io",
1315
"test": "ember test"
1416
},
1517
"repository": "",

0 commit comments

Comments
 (0)