Skip to content

Commit bde4d5b

Browse files
committed
Switch from Now v1 to Heroku
1 parent a069173 commit bde4d5b

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

graphql-server.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ server.use(
5959
)
6060

6161
// Start the application, listening on port 3000
62-
server.listen(3000, () =>
62+
server.listen(process.env.PORT || 3000, () =>
6363
console.log(`Listening on port 3000.
6464
6565
http://localhost:3000/graphql

package.json

+2-9
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
11
{
22
"name": "graphql-rest-api-demo",
33
"version": "0.0.1",
4-
"description":
5-
"A demo of what an equivalent REST API and GraphQL interface look like.",
4+
"description": "A demo of what an equivalent REST API and GraphQL interface look like.",
65
"main": "graphql-server.js",
76
"scripts": {
87
"start": "node graphql-server.js",
98
"start-rest": "node rest-server.js",
10-
"prettify": "prettier --write *.js",
11-
"deploy": "now -e NODE_ENV=production -e MONGO_URL=@ch1-mongo-url",
12-
"alias": "now alias"
13-
},
14-
"now": {
15-
"name": "guide-ch1",
16-
"alias": "ch1.graphql.guide"
9+
"prettify": "prettier --write *.js"
1710
},
1811
"author": "John Resig <[email protected]>",
1912
"license": "MIT",

0 commit comments

Comments
 (0)