Skip to content

Instantly share code, notes, and snippets.

@tirthankarkundu17
Last active May 9, 2020 04:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tirthankarkundu17/b5682cfef5168e3993590785fbed3cc9 to your computer and use it in GitHub Desktop.
Save tirthankarkundu17/b5682cfef5168e3993590785fbed3cc9 to your computer and use it in GitHub Desktop.
A small NODEJS server app
const dotenv = require("dotenv"); // Read from .env file
const express = require("express");
dotenv.config();
const app = express();
const appid = process.env.PORT;
app.get("/", (req, res) => res.send(`Hi from appid: ${appid}`));
app.listen(appid, () => console.log(`Application : ${appid} is listening on port ${appid}`));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment