time-convertor

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

commit 3663f9067b2730f8de4594f3862c6f2e8244284f
parent 3f6debddaa8fbf76133676472394864d1a2989df
Author: Agastya Chandrakant <me@hanabi.in>
Date:   Mon, 18 May 2020 13:15:08 +0530

don't need server, .env, express, dotenv

Diffstat:
Mpackage.json | 2--
Dserver/.env | 2--
Dserver/server.js | 34----------------------------------
Myarn.lock | 2+-
4 files changed, 1 insertion(+), 39 deletions(-)

diff --git a/package.json b/package.json @@ -6,8 +6,6 @@ "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", "@testing-library/user-event": "^7.1.2", - "dotenv": "^8.2.0", - "express": "^4.17.1", "moment-timezone": "^0.5.29", "react": "^16.13.1", "react-dom": "^16.13.1", diff --git a/server/.env b/server/.env @@ -1 +0,0 @@ -PORT=8090 -\ No newline at end of file diff --git a/server/server.js b/server/server.js @@ -1,34 +0,0 @@ -const dotenv = require('dotenv'); -const express = require('express'); -const path = require('path'); - -const envPath = path.join(__dirname, '.env'); -dotenv.config({ - path: envPath, -}); - -const server = express(); -const PORT = process.env.PORT || 8080; - -server.get('/', function (req, res) { - res.send('Hello from server'); -}); - -server.get('/help', function (req, res) { - res.send('This is a help page.'); -}); - -server.get('/from-to', function (req, res) { - res.send('This is a from-to page.'); -}); - -server.get('/future', function (req, res) { - const { from, to } = req.params; - res.send(`From: ${from} To: ${to}`); -}); - -function listening(port) { - console.log(`Server is now running on port ${port}...`); -} - -server.listen(PORT, listening(PORT)); diff --git a/yarn.lock b/yarn.lock @@ -3735,7 +3735,7 @@ dotenv-expand@5.1.0: resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-5.1.0.tgz#3fbaf020bfd794884072ea26b1e9791d45a629f0" integrity sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA== -dotenv@8.2.0, dotenv@^8.2.0: +dotenv@8.2.0: version "8.2.0" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a" integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==