diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2019-05-10 14:06:18 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2019-05-10 14:06:18 +0200 |
commit | bc18049649f0d9cf5efc5a8edc425de2c8707267 (patch) | |
tree | 41becfbb32bff2faa4658af928186abb2a05d302 /mi-processor | |
download | k8s-sandbox-bc18049649f0d9cf5efc5a8edc425de2c8707267.tar.gz k8s-sandbox-bc18049649f0d9cf5efc5a8edc425de2c8707267.tar.bz2 k8s-sandbox-bc18049649f0d9cf5efc5a8edc425de2c8707267.tar.xz k8s-sandbox-bc18049649f0d9cf5efc5a8edc425de2c8707267.zip |
wip
Diffstat (limited to 'mi-processor')
-rw-r--r-- | mi-processor/Dockerfile | 14 | ||||
-rw-r--r-- | mi-processor/package.json | 11 | ||||
-rw-r--r-- | mi-processor/server.js | 16 |
3 files changed, 41 insertions, 0 deletions
diff --git a/mi-processor/Dockerfile b/mi-processor/Dockerfile new file mode 100644 index 0000000..d657cc3 --- /dev/null +++ b/mi-processor/Dockerfile @@ -0,0 +1,14 @@ +FROM node:8 + +WORKDIR /opt + +COPY package*.json ./ + +RUN npm install +# If you are building your code for production +# RUN npm ci --only=production + +COPY . . + +EXPOSE 8080 +CMD [ "npm", "start" ] diff --git a/mi-processor/package.json b/mi-processor/package.json new file mode 100644 index 0000000..2deee39 --- /dev/null +++ b/mi-processor/package.json @@ -0,0 +1,11 @@ +{ + "name": "mi-gateway", + "version": "1.0.0", + "main": "server.js", + "scripts": { + "start": "node server.js" + }, + "dependencies": { + "express": "^4.16.1" + } +} diff --git a/mi-processor/server.js b/mi-processor/server.js new file mode 100644 index 0000000..b739070 --- /dev/null +++ b/mi-processor/server.js @@ -0,0 +1,16 @@ +'use strict'; + +const express = require('express'); + +const PORT = 8080; +const HOST = '0.0.0.0'; + +const app = express(); +app.get('/', (req, res) => { + res.send('mi-server\n'); +}); + +app.listen(PORT, HOST); +console.log(`Running on http://${HOST}:${PORT}`); + +console.log('Environment', process.env) |