Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test PR #7

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .lagoon.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
docker-compose-yaml: docker-compose.yml
project: demo-node-simple
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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`

5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
16 changes: 0 additions & 16 deletions index.js

This file was deleted.

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
5 changes: 5 additions & 0 deletions src/amazee.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
█████ ███ ███ █████ ███████ ███████ ███████ ██ ██████ ██████ ██████ ██████ ██ ██ ███████ ██ ██ ██████ ██ ██
██ ██ ████ ████ ██ ██ ███ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
███████ ██ ████ ██ ███████ ███ █████ █████ ██ ██ ██ ██████ ██ ██ ██ █████ ███████ ████ ██ ██ ██ ██
██ ██ ██ ██ ██ ██ ██ ███ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ██ ██ ██ ██ ███████ ███████ ███████ ██ ██ ██████ ██ ██ ██████ ██████ ██ ██ ███████ ██ ██████ ██████
32 changes: 32 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -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(`<br /><pre>`);
result.push(words);
result.push(`</pre><br />`);
res.header('X-LAGOON' , process.env.HOSTNAME )
res.send(result.join("<br />"))
})

app.listen(3000, function () {
console.log('Example app listening on port 3000!')
})
20 changes: 20 additions & 0 deletions src/index.js.amazee
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const express = require('express')
const app = express()

app.get('/', function (req, res) {
let result = []
result.push(`<br /><pre>
█████ ███ ███ █████ ███████ ███████ ███████ ██ ██████ ██████ ██████ ██████ ██ ██ ███████ ██ ██ ██████ ██ ██
██ ██ ████ ████ ██ ██ ███ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
███████ ██ ████ ██ ███████ ███ █████ █████ ██ ██ ██ ██████ ██ ██ ██ █████ ███████ ████ ██ ██ ██ ██
██ ██ ██ ██ ██ ██ ██ ███ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ██ ██ ██ ██ ███████ ███████ ███████ ██ ██ ██████ ██ ██ ██████ ██████ ██ ██ ███████ ██ ██████ ██████
</pre><br />
`)
res.header('X-LAGOON' , process.env.HOSTNAME )
res.send(result.join("<br />"))
})

app.listen(3000, function () {
console.log('Example app listening on port 3000!')
})
21 changes: 21 additions & 0 deletions src/index.js.mirantis
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const express = require('express')
const app = express()

app.get('/', function (req, res) {
let result = []
result.push(`<br /><pre>
███ ███ ██ ██████ █████ ███ ██ ████████ ██ ███████ ██████ ██████ ██████ ██ ██ ███████ ██ ██ ██████ ██ ██
████ ████ ██ ██ ██ ██ ██ ████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ████ ██ ██ ██████ ███████ ██ ██ ██ ██ ██ ███████ ██████ ██ ██ ██ █████ ███████ ████ ██ ██ ██ ██
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ██ ██ ██ ██ ██ ██ ████ ██ ██ ███████ ██ ██ ██████ ██████ ██ ██ ███████ ██ ██████ ██████

</pre><br />
`)
res.header('X-LAGOON' , process.env.HOSTNAME )
res.send(result.join("<br />"))
})

app.listen(3000, function () {
console.log('Example app listening on port 3000!')
})
6 changes: 6 additions & 0 deletions src/mirantis.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
███ ███ ██ ██████ █████ ███ ██ ████████ ██ ███████ ██████ ██████ ██████ ██ ██ ███████ ██ ██ ██████ ██ ██
████ ████ ██ ██ ██ ██ ██ ████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ████ ██ ██ ██████ ███████ ██ ██ ██ ██ ██ ███████ ██████ ██ ██ ██ █████ ███████ ████ ██ ██ ██ ██
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ██ ██ ██ ██ ██ ██ ████ ██ ██ ███████ ██ ██ ██████ ██████ ██ ██ ███████ ██ ██████ ██████

6 changes: 6 additions & 0 deletions src/words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
____ _____ ____
/ ___| | ____| | __ )
\___ \ | _| | _ \
___) || |___ _| |_) |
|____(_)_____(_)____/

12 changes: 12 additions & 0 deletions src/you_ops_we_aps.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
__ __ _ _ _
\ \ / /__ _ _ __| | ___ | |_| |__ ___ __ _ _ __ _ __ ___
\ V / _ \| | | | / _` |/ _ \ | __| '_ \ / _ \ / _` | '_ \| '_ \/ __|
| | (_) | |_| | | (_| | (_) | | |_| | | | __/ | (_| | |_) | |_) \__ \_
|_|\___/ \__,_| \__,_|\___/ \__|_| |_|\___| \__,_| .__/| .__/|___(_)
|_| |_|
__ __ _ _ _
\ \ / /__ __| | ___ | |_| |__ ___ ___ _ __ ___
\ \ /\ / / _ \ / _` |/ _ \ | __| '_ \ / _ \ / _ \| '_ \/ __|
\ V V / __/ | (_| | (_) | | |_| | | | __/ | (_) | |_) \__ \_
\_/\_/ \___| \__,_|\___/ \__|_| |_|\___| \___/| .__/|___(_)
|_|