blob: ac75c055d4c7675ea408676fa5390cb5d7b9c7b1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
require('dotenv').config({ path: 'variables.env' });
const createServer = require('./createServer');
const db = require('./db');
const server = createServer();
// TODO Use express middlware to handle cookies (JWT)
// TODO Use express middlware to populate current user
server.start(
{
cors: {
credentials: true,
origin: process.env.FRONTEND_URL,
},
},
deets => {
console.log(`Server is now running on port http://localhost:${deets.port}`);
}
);
|