From e60d280be2d6feace0ed70959bbc82e8738c8f72 Mon Sep 17 00:00:00 2001 From: alban Date: Mon, 18 May 2020 16:27:50 +0200 Subject: [PATCH] [fix] remove routes --- routes/index.js | 78 ------------------------------------------------- 1 file changed, 78 deletions(-) delete mode 100644 routes/index.js diff --git a/routes/index.js b/routes/index.js deleted file mode 100644 index 19cbf5d..0000000 --- a/routes/index.js +++ /dev/null @@ -1,78 +0,0 @@ -module.exports = { - main: (req, res) => { - console.log("request /") - res.render('index', { title: 'Hey', message: 'Hello there!' }) - res.end('wut') - -// -// res.type('html') -// res.send(` -// -// -//Welcome to Alex's express.js example -// -// -//

Hi, thanks for using my Express.js lab 👏

-// -//

If you found it useful, view my other GitHub projects today 👑

-// -//

Results from GET /links:

-// -// -// -//

Copyright Alex Ellis 2020 ®

-// -// -// -//`); - }, - links: (req, res) => { - res.type("json") - res.send( - [ - { - "name": "github", - "url": "https://github.com/alexellis" - }, - { - "name": "twitter", - "url": "https://twitter.com/alexellisuk" - }, - { - "name": "blog", - "url": "https://blog.alexellis.io" - }, - { - "name": "sponsors", - "url": "https://github.com/users/alexellis/sponsorship" - }, - ]) - }, - health: (req, res) => { - - // Do an ES request - client.ping({ - // ping usually has a 3000ms timeout - requestTimeout: 1000 - }, function (error) { - if (error) { - console.trace('elasticsearch cluster is down!'); - } else { - console.log('All is well'); - } - }); - res.send("OK"); - } -}