-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver.js
28 lines (23 loc) · 815 Bytes
/
server.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
import config from './config.js';
import express from 'express';
import logger from 'morgan';
import './src/controllers/user.js';
import './src/controllers/role.js';
import './src/controllers/location.js';
import './src/controllers/area.js';
import './src/controllers/file.js';
import './src/controllers/field.js';
import './src/controllers/userArea.js';
import './src/controllers/shift.js';
import './src/controllers/booking.js';
import './src/controllers/shiftSeries.js';
import './src/controllers/follower.js';
import './src/controllers/followerNote.js';
import { router } from './src/utils/handler.js';
const app = express();
app.use(logger('dev'));
app.use(express.json());
app.use('/photos', express.static('photos'));
app.use('/', router);
const server = app.listen(config.port);
export default server;