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.

20 lines
433 B

  1. const routes = require('express').Router();
  2. /** used to parse the request URL */
  3. const url = require('url');
  4. const contentLoader = require('../../includes/staticContentServer.js');
  5. routes.get('*', (request, result) =>
  6. {
  7. var filename = url.parse(request.url, true).pathname;
  8. if(!contentLoader.serveStaticContent(request, result, filename, "includes"))
  9. {
  10. //missing content
  11. }
  12. });
  13. module.exports = routes;