Routes index
parent
2091dae63b
commit
0df1d302da
|
@ -12,9 +12,9 @@ routes.use(bodyParser.urlencoded({ extended: true }));
|
||||||
routes.use(bodyParser.json());
|
routes.use(bodyParser.json());
|
||||||
|
|
||||||
routes.use((req, res, next) => {
|
routes.use((req, res, next) => {
|
||||||
// do logging
|
// do logging
|
||||||
console.log(`Resource requested: ${req.method} ${req.originalUrl}`);
|
console.log(`Resource requested: ${req.method} ${req.originalUrl}`);
|
||||||
next(); // make sure we go to the next routes and don't stop here
|
next(); // make sure we go to the next routes and don't stop here
|
||||||
});
|
});
|
||||||
|
|
||||||
routes.get('/', (req, res) => {
|
routes.get('/', (req, res) => {
|
||||||
|
|
Loading…
Reference in New Issue