2019-07-31 07:14:12 +00:00
|
|
|
const express = require("express");
|
|
|
|
const helmet = require('helmet');
|
|
|
|
const cors = require('cors');
|
|
|
|
|
2019-08-01 06:55:37 +00:00
|
|
|
const authRouter = require('../services/auth/authRouter');
|
2019-08-01 07:42:25 +00:00
|
|
|
const usersRouter = require('../services/users/usersRouter');
|
2019-08-01 06:55:37 +00:00
|
|
|
|
2019-07-31 07:14:12 +00:00
|
|
|
const server = express();
|
|
|
|
|
|
|
|
server.use(helmet());
|
|
|
|
server.use(express.json());
|
|
|
|
server.use(cors());
|
|
|
|
|
2019-08-01 06:55:37 +00:00
|
|
|
server.use('/api/auth', authRouter);
|
2019-08-01 07:42:25 +00:00
|
|
|
server.use('/api/users', usersRouter);
|
2019-08-01 06:55:37 +00:00
|
|
|
|
2019-07-31 07:14:12 +00:00
|
|
|
module.exports = server;
|