Skip to content

Instantly share code, notes, and snippets.

@ezarko
Last active February 18, 2016 21:13
Show Gist options
  • Save ezarko/6fbfc96526185186474a to your computer and use it in GitHub Desktop.
Save ezarko/6fbfc96526185186474a to your computer and use it in GitHub Desktop.
Simple express server application
You can add matic by adding "matic" and "jade" to the package.json, then add "RUN $(npm bin)/matic" to the Dockerfile.
I wonder if it would be as easy to add harpjs?
FROM node:4.3.0
RUN useradd -ms /bin/bash node
ADD . /home/node/app/
RUN mv /home/node/app/.bowerrc /home/node/app/.gitconfig /home/node/app/.npmrc /home/node/
RUN chown -R node:node /home/node
USER node
ENV HOME /home/node
WORKDIR /home/node/app
RUN npm install
EXPOSE 3000
CMD [ "npm", "start" ]
{
"name" : "ServeStaticContent",
"version" : "0.0.1",
"dependencies" : {
"express" : "3.x"
}
}
var express = require('express');
var app = express();
app.use(express.static(__dirname + '/web'));
app.listen(process.env.PORT || 3000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment