Commit 06133cd96c9dba5b479dd63ca19fc29cd69cb6d7
1 parent
abef83aa
Suppression des dépendances non-nécessaires
À suivre bêtement les tutos...
Showing
2 changed files
with
1 additions
and
9 deletions
Show diff stats
package.json
server.js
1 | 1 | // Modules ==================================================================== |
2 | 2 | var express = require('express'); |
3 | -var app = express(); | |
4 | 3 | var mongoose = require('mongoose'); |
5 | -var morgan = require('morgan'); | |
6 | 4 | var bodyParser = require('body-parser'); |
7 | -var methodOverride = require('method-override'); | |
8 | 5 | var cookieParser = require('cookie-parser'); |
9 | 6 | |
10 | 7 | // Application ================================================================ |
11 | 8 | |
9 | +var app = express(); | |
12 | 10 | var config = require('./config/config.js'); |
13 | 11 | var port = process.env.PORT || config.port; |
14 | 12 | |
... | ... | @@ -18,13 +16,9 @@ mongoose.connect(db.url); |
18 | 16 | |
19 | 17 | // Tricks |
20 | 18 | app.use(bodyParser.json()); |
21 | -app.use(bodyParser.json({ | |
22 | - type: 'application/vnd.api+json' | |
23 | -})); | |
24 | 19 | app.use(bodyParser.urlencoded({ |
25 | 20 | extended: true |
26 | 21 | })); |
27 | -app.use(methodOverride('X-HTTP-Method-Override')); | |
28 | 22 | |
29 | 23 | // Cookie-parser |
30 | 24 | app.use(cookieParser()); | ... | ... |