Luke Childs
8 years ago
4 changed files with 8 additions and 3 deletions
@ -1,12 +1,11 @@ |
|||
const nunjucks = require('nunjucks'); |
|||
const express = require('express'); |
|||
const viewModel = require('./viewModels'); |
|||
const app = express(); |
|||
const port = process.env.port || 3000; |
|||
|
|||
nunjucks.configure('views', { express: app }); |
|||
|
|||
app.get('/', (req, res) => { |
|||
res.render('index.html'); |
|||
}); |
|||
app.get('/', viewModel.listing); |
|||
|
|||
app.listen(port, () => console.log(`Tor Explorer listening on port ${port}`)); |
|||
|
@ -0,0 +1,3 @@ |
|||
module.exports = { |
|||
listing: require('./listing') |
|||
}; |
@ -0,0 +1,3 @@ |
|||
module.exports = (req, res) => { |
|||
res.render('listing.html'); |
|||
} |
Loading…
Reference in new issue