Skip to content

Instantly share code, notes, and snippets.

@varqasim
Created January 23, 2021 23:02
Show Gist options
  • Select an option

  • Save varqasim/5e17a5d566f1d0b19ca9c93bcdb91074 to your computer and use it in GitHub Desktop.

Select an option

Save varqasim/5e17a5d566f1d0b19ca9c93bcdb91074 to your computer and use it in GitHub Desktop.

Revisions

  1. varqasim revised this gist Jan 23, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion app.js
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,7 @@ var app = express();
    var PORT = 3000;

    app.get('/', (req, res) => {
    res.send("GET Request Called")
    res.send("Hello World")
    })

    app.listen(PORT, function(err){
  2. varqasim created this gist Jan 23, 2021.
    11 changes: 11 additions & 0 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    FROM node:12.16.3-alpine

    COPY package.json package-lock*.json ./

    RUN npm install

    COPY . .

    RUN npm run build

    CMD ["npm", "run", "start"]
    12 changes: 12 additions & 0 deletions app.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    var express = require('express');
    var app = express();
    var PORT = 3000;

    app.get('/', (req, res) => {
    res.send("GET Request Called")
    })

    app.listen(PORT, function(err){
    if (err) console.log(err);
    console.log("Server listening on PORT", PORT);
    });