|
|
@ -1,10 +1,14 @@ |
|
|
|
const crypto = require('crypto'); |
|
|
|
|
|
|
|
const app = express(); |
|
|
|
|
|
|
|
const dotenv = require("dotenv").config(); |
|
|
|
const express = require("express"); |
|
|
|
const session = require('express-session'); |
|
|
|
const dotenv = require("dotenv").config(); |
|
|
|
const app = express(); |
|
|
|
|
|
|
|
|
|
|
|
const sessionProperties = { |
|
|
|
secret: process.env.SESSION_SECRET, |
|
|
|
secret: process.env.SESSION_SECRET || crypto.randomBytes(64), |
|
|
|
cookie: { maxAge: 6000000 }, |
|
|
|
resave: false, |
|
|
|
saveUninitialized: false |
|
|
@ -18,4 +22,4 @@ const routes = require('./routes'); |
|
|
|
app.use('/', routes); |
|
|
|
|
|
|
|
|
|
|
|
app.listen(process.env.PORT, () => console.log(`App listening on port ${process.env.PORT}!`)); |
|
|
|
app.listen(process.env.PORT || 8100, () => console.log(`App listening on port ${process.env.PORT || 8100}!`)); |