diff --git a/package.json b/package.json index 6228ddeb..fe38da0f 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,6 @@ "ejs": "^3.1.5", "express": "~4.16.1", "fs": "0.0.1-security", - "morgan": "~1.9.1", "sass": "^1.26.10", "sass-folder-converter": "^1.0.3" }, diff --git a/server.js b/server.js index d4e3b17d..a35ace87 100644 --- a/server.js +++ b/server.js @@ -1,5 +1,4 @@ const express = require("express"); -const bodyParser = require("body-parser"); const fs = require("fs"); const convertSass = require("sass-folder-converter"); @@ -9,9 +8,6 @@ convertSass(__dirname + "/public/sass/", __dirname + "/public/css/"); // Create express instance : global.server = express(); -// Setup the logger : -server.use(require("morgan")("dev")); - // Define public folder : server.use(express.static(__dirname + "/public")); @@ -21,10 +17,6 @@ server.set("views", __dirname + "/views"); // Setup view engine : server.set("view engine", "ejs"); -// Add body parser middleware for get body content (for post method) : -server.use(bodyParser.json()); // support json encoded bodies -server.use(bodyParser.urlencoded({ extended: true })); // support encoded bodies - // Routes and 404 error : fs.readdirSync(__dirname + "/routes/").forEach(fileName => require("./routes/" + fileName)); //TODO: ajout du support des sous dossier.