Skip to content
Permalink
Browse files

Add route for the API documentation (redirect)

  • Loading branch information...
peter-stuhlmann committed Jul 17, 2019
1 parent 7175843 commit 76784474f47d23099aba5188673a8c0b6ec9a803
Showing with 8 additions and 0 deletions.
  1. +4 −0 index.js
  2. +4 −0 v1/v1.js
@@ -10,6 +10,10 @@ app.get('/', (req, res) => {
res.redirect('/v1');
});

app.get('/docs', (req, res) => {
res.redirect('/v1/docs');
});

app.use('/v1', routerV1);

app.listen(port, () => console.log(`ColorConverter is running on port ${port}!`));
@@ -6,6 +6,10 @@ router.get('/', (req, res) => {
res.redirect('https://github.com/peter-stuhlmann/ColorConverter-API');
});

router.get('/docs', (req, res) => {
res.redirect('https://github.com/peter-stuhlmann/ColorConverter-API');
});

router.use('/convert', routerConvert);

module.exports = router

0 comments on commit 7678447

Please sign in to comment.
You can’t perform that action at this time.