aboutsummaryrefslogtreecommitdiff
path: root/mi-processor
diff options
context:
space:
mode:
Diffstat (limited to 'mi-processor')
-rw-r--r--mi-processor/Dockerfile14
-rw-r--r--mi-processor/package.json11
-rw-r--r--mi-processor/server.js16
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)