Ajout d'une page d'accueil sur le serveur de dev

pull/607/head
Maxime Quandalle 2019-07-09 11:23:46 +02:00
parent 5cef59ceb4
commit 39d93e644b
1 changed files with 7 additions and 1 deletions

View File

@ -12,6 +12,12 @@ const rewrite = basename => ({
to: `/${basename}.html`
})
app.get('/', function(req, res) {
res.send(`This website is available in 2 languages :
<ul><li><a href="/mon-entreprise">mon-entreprise [fr]</a></li>
<li><a href="/infrance">infrance [en]</a></li></ul>`)
})
app.use(
history({
rewrites: ['infrance', 'mon-entreprise'].map(rewrite)
@ -30,5 +36,5 @@ app.use(
app.use(require('webpack-hot-middleware')(compiler))
app.listen(8080, function() {
console.log('Example app listening on port 8080!\n')
console.log('Mon-entreprise listening on port 8080!\n')
})