Skip to content

Commit 197d9ba

Browse files
deploy
1 parent 09f4acb commit 197d9ba

File tree

4 files changed

+7
-28
lines changed

4 files changed

+7
-28
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ docker-compose.yml
88
docker-compose.debug.yml
99
schema-product.json
1010
.vscode
11-
.dockerignore
11+
.dockerignore
12+
.now

index.js renamed to app.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const bodyParser = require('body-parser');
88
const boom = require('boom');
99
const helmet = require("helmet");
1010
const cors = require('cors');
11-
const debug = require('debug')("app:server");
1211
const productsRouter = require('./routes/views/products');
1312
const usersRouter = require('./routes/views/users');
1413
const productsApiRouter = require('./routes/api/products');
@@ -62,7 +61,4 @@ app.use(wrapErrors);
6261
app.use(clientErrorHandler);
6362
app.use(errorHandler);
6463

65-
// server
66-
const server = app.listen(3000, function() {
67-
debug(`Listening http://localhost:${server.address().port}`);
68-
});
64+
module.exports = app;

now.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
{
2-
"name": "api-express-js",
2+
"name": "express-generator-example",
33
"version": "0.0.0",
44
"private": true,
5-
"main": "index.js",
65
"scripts": {
7-
"start": "node index",
6+
"start": "node ./bin/www",
87
"build": "NODE_ENV=production cd public/assets && cleancss -o main.min.css main.css",
9-
"dev": "nodemon index",
8+
"dev": "nodemon ./bin/www",
109
"test:cover": "nyc npm run test",
11-
"dev:inspect": "nodemon --inspect index",
10+
"dev:inspect": "nodemon --inspect ./bin/www",
1211
"dev:debug": "DEBUG=express:*,app:* npm run dev",
1312
"debug": "DEBUG=express:*,app:* npm run start",
1413
"test": "mocha --exit"

0 commit comments

Comments
 (0)