mirror of https://github.com/pelias/api.git
Julian Simioni
7 years ago
committed by
GitHub
2 changed files with 16 additions and 1 deletions
@ -0,0 +1,12 @@
|
||||
// set up routes that are outside any particular API version
|
||||
function addRoutes(app) { |
||||
function redirectToV1(req, res, next) { |
||||
res.redirect(301, '/v1'); |
||||
} |
||||
|
||||
// default root URL traffic to V1 root
|
||||
// which has a link to the readme and other helpful info
|
||||
app.get('/', redirectToV1); |
||||
} |
||||
|
||||
module.exports.addRoutes = addRoutes; |
Loading…
Reference in new issue