mirror of
https://github.com/len0rd/personal-website.git
synced 2026-01-20 08:40:44 -05:00
update and verify working locally
This commit is contained in:
parent
755be916b8
commit
0e67a57813
4 changed files with 178 additions and 185 deletions
|
|
@ -2,7 +2,7 @@ const PORT = 8090;
|
|||
var express = require('express');
|
||||
var app = express();
|
||||
|
||||
console.log('Starting express server');
|
||||
console.log('Starting express server on port ' + PORT);
|
||||
|
||||
// set the view engine to ejs
|
||||
app.set('view engine', 'ejs');
|
||||
|
|
@ -13,7 +13,7 @@ app.use(express.static(__dirname + '/assets'));
|
|||
app.get(/\/.*/, function(req, res) {
|
||||
let pathname = 'pages' + req.path;
|
||||
let page = pathname.substr(pathname.lastIndexOf('/') + 1);
|
||||
|
||||
|
||||
if (pathname !== null && pathname !== undefined) {
|
||||
if ((pathname)[pathname.length - 1] === '/') {
|
||||
pathname += 'index';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue