Personal blog written from scratch using Node.js, Bootstrap, and MySQL. https://jrtechs.net
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.

34 lines
757 B

  1. const routes = require('express').Router();
  2. const analytics = require('./analytics');
  3. routes.use('/analytics', analytics);
  4. const login = require('./login');
  5. routes.use('/login', login);
  6. const posts = require('./posts');
  7. routes.use('/posts', posts);
  8. const downloads = require('./downloads');
  9. routes.use('/downloads', downloads);
  10. const users = require('./users');
  11. routes.use('/users', users);
  12. routes.get('/', (request, result) =>
  13. {
  14. if(utils.checkPrivilege(request) >= utils.PRIVILEGE.MEMBER)
  15. {
  16. utils.renderHTML(request, result, "users.html", getUserInformation);
  17. }
  18. else
  19. {
  20. utils.printError(result, "You need to be logged in");
  21. }
  22. });
  23. routes.get('*', (request, result) =>
  24. {
  25. //error
  26. });
  27. module.exports = routes;