Commit 1cf4da35 authored by Matthieu - Greep's avatar Matthieu - Greep

Update root

parent 16e1a790
Pipeline #455 passed with stage
in 47 seconds
......@@ -113,7 +113,11 @@ app.use(function(req, res, next){
})
app.get('/', (req, res) => {
res.json({'online': true})
let data = {online: true, routes: [], docs: 'https://git.willers.digital/Dennis.Willers/voting/blob/master/README.md'};
fs.readdirSync(path.join(__dirname, 'route')).filter(file => file.endsWith('.js')).forEach(function(file) {
data.routes.push(file.replace(/\.js$/i,''))
});
res.json(data);
})
fs.readdirSync(path.join(__dirname, 'route')).filter(file => file.endsWith('.js')).forEach(function(file) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment