20 lines
536 B
JavaScript
20 lines
536 B
JavaScript
const express = require("express");
|
|
const helmet = require('helmet');
|
|
const cors = require('cors');
|
|
|
|
const authRouter = require('../services/auth/authRouter');
|
|
const usersRouter = require('../services/users/usersRouter');
|
|
const sessionsRouter = require('../services/sessions/sessionsRouter');
|
|
|
|
const server = express();
|
|
|
|
server.use(helmet());
|
|
server.use(express.json());
|
|
server.use(cors());
|
|
|
|
server.use('/api/auth', authRouter);
|
|
server.use('/api/users', usersRouter);
|
|
server.use('/api/users', sessionsRouter);
|
|
|
|
module.exports = server;
|