Dieses Repository beinhaltet HTML- und Javascript Code zur einer NotizenWebApp auf Basis von Web Storage. Zudem sind Mocha/Chai Tests im Browser enthalten. https://meinenotizen.netlify.app/
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.

spa-ignore-assets.js 414B

1234567891011121314
  1. // Single Page Apps - redirect to /#/ except when a file extension is given
  2. var path = require('path');
  3. module.exports = function(req, res, next) {
  4. if (req.method !== "GET" && req.method !== "HEAD")
  5. next();
  6. if (req.url !== '/' && path.extname(req.url) === '') {
  7. var route = req.url;
  8. req.url = '/';
  9. res.statusCode = 302;
  10. res.setHeader('Location', req.url + '#' + route);
  11. res.end();
  12. }
  13. else next();
  14. }