time-convertor

Convert time across timezones
git clone http://git.hanabi.in/repos/time-convertor.git
Log | Files | Refs | README | LICENSE

commit 077a88ffbc6f54a671cbfe68c1e5129b80231ae2
parent e02dc7a025437a860850cf6eb878ffb5f5d27667
Author: Agastya Chandrakant <me@hanabi.in>
Date:   Mon, 18 May 2020 07:16:06 +0530

rmv impossible routes

Diffstat:
Mserver/server.js | 14+++-----------
1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/server/server.js b/server/server.js @@ -18,23 +18,15 @@ server.get('/help', function (req, res) { res.send('This is a help page.'); }); -server.get('/:to', function (req, res) { - const { to } = req.params; - res.send(`To: ${to}`); +server.get('/from-to', function (req, res) { + res.send('This is a from-to page.'); }); -server.get('/:from/:to', function (req, res) { +server.get('/future', function (req, res) { const { from, to } = req.params; res.send(`From: ${from} To: ${to}`); }); -server.get('/:from/:fromDate/:to/:toDate', function (req, res) { - const { from, fromDate, to, toDate } = req.params; - res.send( - `From: ${from}\nFrom Date: ${fromDate}\nTo: ${to}\nTo Date${toDate}` - ); -}); - function listening(port) { console.log(`Server is now running on port ${port}...`); }