Website for visualizing a persons github network.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
681 B

  1. const crypto = require('crypto');
  2. const app = express();
  3. const dotenv = require("dotenv").config();
  4. const express = require("express");
  5. const session = require('express-session');
  6. const sessionProperties = {
  7. secret: process.env.SESSION_SECRET || crypto.randomBytes(64),
  8. cookie: { maxAge: 6000000 },
  9. resave: false,
  10. saveUninitialized: false
  11. };
  12. app.use(session(sessionProperties));
  13. app.use(express.urlencoded({ extended: true }));
  14. app.use(express.json());
  15. app.use(express.static('public'));
  16. const routes = require('./routes');
  17. app.use('/', routes);
  18. app.listen(process.env.PORT || 8100, () => console.log(`App listening on port ${process.env.PORT || 8100}!`));