-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from renanlopescoder/v2.1.0
v2.1.0
- Loading branch information
Showing
12 changed files
with
134 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
web: pm2 start server.js && pm2 logs all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
const express = require('express'); | ||
const bodyParser = require('body-parser'); | ||
const load = require('express-load'); | ||
const cors = require('cors'); | ||
const consign = require('consign'); | ||
const server = express(); | ||
|
||
server.use(bodyParser.json()); | ||
server.set('secret', 'opensecret'); | ||
server.use(cors({ origin: '*' })); | ||
|
||
load('src/models') | ||
.then('src/actions') | ||
.then('src/routes/auth.js') | ||
.then('src/routes') | ||
.into(server); | ||
consign({cwd: process.cwd() + '/src'}) | ||
.include("models") | ||
.then("actions") | ||
.then("routes/auth.js") | ||
.then("routes") | ||
.into(server); | ||
|
||
module.exports = server; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,26 @@ | ||
{ | ||
"name": "rest_api_node", | ||
"version": "2.0.0", | ||
"description": "NodeJS REST API is a open code NodeJS Back End API", | ||
"name": "node_api", | ||
"version": "2.1.0", | ||
"description": "Node API is production ready and open source project in Node, Express, MongoDB and PM2", | ||
"scripts": { | ||
"dev": "pm2 start server.js --watch", | ||
"preinstall": "npm i -g pm2 && pm2 install pm2-logrotate", | ||
"dev": "pm2 start server.js --watch && pm2 logs", | ||
"start": "node ./node_modules/.bin/pm2 start server.js" | ||
}, | ||
"author": "Renan Lopes", | ||
"license": "MIT", | ||
"dependencies": { | ||
"bcrypt": "^1.0.2", | ||
"body-parser": "^1.15.2", | ||
"consign": "^0.1.6", | ||
"cors": "^2.8.3", | ||
"express": "^4.14.0", | ||
"express-load": "^1.1.16", | ||
"jsonwebtoken": "^7.2.1", | ||
"mongoose": "^4.7.1", | ||
"nodemailer": "^4.2.0", | ||
"pm2": "^2.9.3" | ||
}, | ||
"engines": { | ||
"node": "7.10.1" | ||
"node": "8.9.4" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.