codekarim is just a bunch of reminders for fenuapps.com
# use an existing docker image FROM node:alpine # dowload & install dependency COPY ./ ./ RUN npm install # Tell the image what to do when it starts CMD ["npm", "start"]
{ "dependencies": { "express": "*" }, "scripts": { "start": "node index.js" } }
const express = require('express'); const app = express(); app.get('/', (req, res) => { res.send('Hi there'); }); app.listen(8080, () => { console.log('Listening on 8080'); });