This commit is contained in:
matteo
2018-11-14 15:08:21 +01:00
parent 78857bb1c5
commit d2c592d18d
4 changed files with 83 additions and 21 deletions
+6 -2
View File
@@ -3,8 +3,12 @@ const app = express();
app.use(express.static(__dirname + '/build'));
app.get('/test', (req, res) => {
res.send({ ok: 'ok get' });
app.get('/test/:id', (req, res) => {
// req.params.id
// new wiki().page(req.params.id)
// .then(page => page.fullInfo())
// .then(parsed => res.send(parsed));
res.send({ok:req.params.id});
});
app.listen(8000, () => console.log('listen on 8000'));