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.

31 lines
709 B

  1. /** express app for routing */
  2. const express = require("express");
  3. /**session data for login and storing preferences*/
  4. const session = require('express-session');
  5. const configLoader = require('./configManager.js');
  6. const app = express();
  7. /**Initializes sessions for login */
  8. app.use(session(
  9. { secret: configLoader.getSessionSecret(),
  10. cookie: { maxAge: 6000000 }}
  11. ));
  12. app.use(express.urlencoded()); //for easy retrieval of post and get data
  13. app.use(express.json());
  14. app.use(express.static('public'));
  15. const routes = require('./routes');
  16. app.use('/', routes);
  17. app.listen(configLoader.getConfiguration().port, () =>
  18. console.log(`App listening on port ${configLoader.getPort()}!`)
  19. );