Created
December 27, 2017 19:05
-
-
Save pkellner/f3bdf727c175e17a3c2b494010d5f286 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import express from 'express'; | |
import renderer from './renderer'; | |
const app = express(); | |
app.use(express.static('public', { | |
// index: false | |
index: false | |
})); | |
app.get('*', (req, res) => { | |
console.log('index.js:' + req.url); | |
//res.send(renderer(req)); | |
if (req.url === '/speakers'){ | |
//res.redirect('/index.html'); | |
console.log('speakers doing nothing') | |
} else { | |
console.log('call res.sender(renderer..)') | |
res.send(renderer(req)); | |
} | |
}); | |
app.listen(3010, () => { | |
console.log('Listening on port 3010 svccc'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment