Skip to content

Instantly share code, notes, and snippets.

Last active May 9, 2020 04:51
What would you like to do?
A small NODEJS server app
const dotenv = require("dotenv"); // Read from .env file
const express = require("express");
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