-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from philtrep/example-simple
Example simple
- Loading branch information
Showing
4 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
## Simple Web Service | ||
|
||
### Setup | ||
|
||
Copy the index file in this folder to the project root: | ||
|
||
```bash | ||
cd <project_folder>/ | ||
|
||
cp nodock/_examples/simple-web/index.js . | ||
cp nodock/_examples/simple-web/package.json . | ||
``` | ||
|
||
### Usage | ||
|
||
```bash | ||
cd nodock/ | ||
docker-compose up -d node nginx | ||
``` | ||
|
||
By going to `127.0.0.1` in your browser you should be seeing a nice greeting! |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
var express = require('express'); | ||
var app = express(); | ||
|
||
app.get('/', function(req, res) { | ||
res.send('You are amazing'); | ||
}); | ||
|
||
app.listen(8000); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "example-simple-web-node-docker", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "", | ||
"license": "MIT", | ||
"dependencies": { | ||
"express": "^4.14.0" | ||
} | ||
} |