Last active
February 18, 2016 21:13
-
-
Save ezarko/6fbfc96526185186474a to your computer and use it in GitHub Desktop.
Simple express server application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name" : "ServeStaticContent", | |
"version" : "0.0.1", | |
"dependencies" : { | |
"express" : "3.x" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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