diff --git a/.lagoon.yml b/.lagoon.yml
index c76c3c4..e95f9c9 100644
--- a/.lagoon.yml
+++ b/.lagoon.yml
@@ -1 +1,2 @@
docker-compose-yaml: docker-compose.yml
+project: demo-node-simple
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..01d6b68
--- /dev/null
+++ b/README.md
@@ -0,0 +1,7 @@
+# Demo a node app
+
+## Use figlet to made a text logo
+On ubuntu, `apt-get install figlet`
+
+Run `echo Some Words | figlet > src/words.txt`
+
diff --git a/docker-compose.yml b/docker-compose.yml
index 48a7c45..e635031 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -7,13 +7,14 @@ services:
build:
context: .
dockerfile: node.dockerfile
+ command: yarn run dev
labels:
lagoon.type: node
volumes:
- - .:/app:delegated
+ - ./src:/app/src:delegated
environment:
- LAGOON_LOCALDEV_HTTP_PORT=3000
- - LAGOON_ROUTE=http://node.docker.amazee.io
+ - LAGOON_ROUTE=http://demo-node-simple.docker.amazee.io
networks:
amazeeio-network:
diff --git a/index.js b/index.js
deleted file mode 100644
index 7b74fd8..0000000
--- a/index.js
+++ /dev/null
@@ -1,16 +0,0 @@
-const express = require('express')
-const app = express()
-
-app.get('/', function (req, res) {
- let result = []
- Object.keys(process.env).map(key => {
- result.push(`${key}=${process.env[key]}`)
- })
- result.sort()
- res.header('X-LAGOON' , process.env.HOSTNAME )
- res.send(result.join("
"))
-})
-
-app.listen(3000, function () {
- console.log('Example app listening on port 3000!')
-})
diff --git a/package.json b/package.json
index a16c5e6..2bfca52 100644
--- a/package.json
+++ b/package.json
@@ -7,6 +7,10 @@
"express": "^4.17.1"
},
"scripts": {
- "start": "node index.js"
+ "start": "node src/index.js",
+ "dev": "nodemon src/index.js"
+ },
+ "devDependencies": {
+ "nodemon": "^2.0.20"
}
}
diff --git a/src/amazee.txt b/src/amazee.txt
new file mode 100644
index 0000000..13d6a73
--- /dev/null
+++ b/src/amazee.txt
@@ -0,0 +1,5 @@
+ █████ ███ ███ █████ ███████ ███████ ███████ ██ ██████ ██████ ██████ ██████ ██ ██ ███████ ██ ██ ██████ ██ ██
+ ██ ██ ████ ████ ██ ██ ███ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
+ ███████ ██ ████ ██ ███████ ███ █████ █████ ██ ██ ██ ██████ ██ ██ ██ █████ ███████ ████ ██ ██ ██ ██
+ ██ ██ ██ ██ ██ ██ ██ ███ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
+ ██ ██ ██ ██ ██ ██ ███████ ███████ ███████ ██ ██ ██████ ██ ██ ██████ ██████ ██ ██ ███████ ██ ██████ ██████
diff --git a/src/index.js b/src/index.js
new file mode 100644
index 0000000..9848ff2
--- /dev/null
+++ b/src/index.js
@@ -0,0 +1,32 @@
+const express = require('express')
+const app = express()
+const fs = require('fs');
+
+app.get('/', function (req, res) {
+
+ let words = "";
+ try {
+ words = fs.readFileSync('src/words.txt', 'utf8');
+ console.log(words);
+ } catch (err) {
+ console.error(err);
+ words = `
+ █████ ███ ███ █████ ███████ ███████ ███████ ██ ██████ ██████ ██████ ██████ ██ ██ ███████ ██ ██ ██████ ██ ██
+ ██ ██ ████ ████ ██ ██ ███ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
+ ███████ ██ ████ ██ ███████ ███ █████ █████ ██ ██ ██ ██████ ██ ██ ██ █████ ███████ ████ ██ ██ ██ ██
+ ██ ██ ██ ██ ██ ██ ██ ███ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
+ ██ ██ ██ ██ ██ ██ ███████ ███████ ███████ ██ ██ ██████ ██ ██ ██████ ██████ ██ ██ ███████ ██ ██████ ██████
+ `;
+ }
+
+ let result = []
+ result.push(`
`); + result.push(words); + result.push(`
+ █████ ███ ███ █████ ███████ ███████ ███████ ██ ██████ ██████ ██████ ██████ ██ ██ ███████ ██ ██ ██████ ██ ██ + ██ ██ ████ ████ ██ ██ ███ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ + ███████ ██ ████ ██ ███████ ███ █████ █████ ██ ██ ██ ██████ ██ ██ ██ █████ ███████ ████ ██ ██ ██ ██ + ██ ██ ██ ██ ██ ██ ██ ███ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ + ██ ██ ██ ██ ██ ██ ███████ ███████ ███████ ██ ██ ██████ ██ ██ ██████ ██████ ██ ██ ███████ ██ ██████ ██████ +
+███ ███ ██ ██████ █████ ███ ██ ████████ ██ ███████ ██████ ██████ ██████ ██ ██ ███████ ██ ██ ██████ ██ ██ +████ ████ ██ ██ ██ ██ ██ ████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ +██ ████ ██ ██ ██████ ███████ ██ ██ ██ ██ ██ ███████ ██████ ██ ██ ██ █████ ███████ ████ ██ ██ ██ ██ +██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ +██ ██ ██ ██ ██ ██ ██ ██ ████ ██ ██ ███████ ██ ██ ██████ ██████ ██ ██ ███████ ██ ██████ ██████ + +