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.
 
 

35 lines
757 B

const routes = require('express').Router();
const analytics = require('./analytics');
routes.use('/analytics', analytics);
const login = require('./login');
routes.use('/login', login);
const posts = require('./posts');
routes.use('/posts', posts);
const downloads = require('./downloads');
routes.use('/downloads', downloads);
const users = require('./users');
routes.use('/users', users);
routes.get('/', (request, result) =>
{
if(utils.checkPrivilege(request) >= utils.PRIVILEGE.MEMBER)
{
utils.renderHTML(request, result, "users.html", getUserInformation);
}
else
{
utils.printError(result, "You need to be logged in");
}
});
routes.get('*', (request, result) =>
{
//error
});
module.exports = routes;