Skip to content

Commit

Permalink
inital commit
Browse files Browse the repository at this point in the history
  • Loading branch information
BretFisher committed Mar 31, 2016
0 parents commit 92cc6f3
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@

# Created by https://www.gitignore.io/api/node,osx

### Node ###
# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules
jspm_packages

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history


### OSX ###
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM node:latest

COPY . /src

WORKDIR /src

RUN npm install

EXPOSE 8080

CMD ["node", "index.js"]
13 changes: 13 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
var express = require('express');

// Constants
var PORT = 8080;
// more comments
// App
var app = express();
app.get('/', function (req, res) {
res.send('Hello world\n');
});

app.listen(PORT);
console.log('Running on http://localhost:' + PORT);
10 changes: 10 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "docker-node-hello",
"private": true,
"version": "0.0.1",
"description": "Node.js Hello world app using docker",
"author": "Bret Fisher <[email protected]>",
"dependencies": {
"express": "^4.13.3"
}
}

0 comments on commit 92cc6f3

Please sign in to comment.