Skip to content

Instantly share code, notes, and snippets.

@staskolukasz
staskolukasz / Dockerfile
Last active February 22, 2019 08:55
Sample docker file for Node.js application
FROM node:10.13.0-alpine
WORKDIR /usr/app
COPY package.json .
COPY package-lock.json .
COPY index.js .
RUN npm install && npm cache clean --force
@staskolukasz
staskolukasz / package.json
Last active February 21, 2019 08:51
Simple "npm run start" command
...
"scripts": {
"start": "node index.js"
}
...
@staskolukasz
staskolukasz / index.js
Created February 21, 2019 08:33
Sample Node.js application
const express = require('express');
const app = express();
const port = 3000;
app.get('/', (_, res) => {
res.send('Hello world!');
});
app.listen(port, () => {