-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
28 lines (23 loc) · 1006 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
const express = require('express');
const logger = require('morgan');
const AuthenticationHandler = require('./Middleware/AuthenticationHandler');
const indexRouter = require('./Frameworks/express/routes/index');
const songsRouter = require('./Frameworks/express/routes/songs');
const albumsRouter = require('./Frameworks/express/routes/albums');
const playlistsRouter = require('./Frameworks/express/routes/playlists');
const usersRouter = require('./Frameworks/express/routes/users');
const authenticationsRouter = require('./Frameworks/express/routes/authentications');
const PreResponseHandler = require('./Middleware/PreResponseHandler');
const app = express();
app.use(logger('dev'));
app.use(express.json());
app.use(express.urlencoded({ extended: false }));
app.use('/', indexRouter);
app.use(AuthenticationHandler);
app.use(songsRouter);
app.use(albumsRouter);
app.use(playlistsRouter);
app.use(usersRouter);
app.use(authenticationsRouter);
app.use(PreResponseHandler);
module.exports = app;