Compare commits

...

2 Commits

Author SHA1 Message Date
nightly 3fa2df5bd0 Make config.json, Make webserver respect config.
continuous-integration/drone/push Build is passing Details
2022-10-20 09:07:07 +02:00
nightly f9238bd2c1 Change name of pipeline job. 2022-10-19 16:11:11 +02:00
6 changed files with 39 additions and 6 deletions

View File

@ -1,5 +1,5 @@
kind: pipeline
name: default
name: AMD64
steps:
- name: Install

View File

@ -29,7 +29,7 @@ export function startWebserver(config: any) {
});
if (config) {
console.log("test");
console.log(config.port);
}
// View engine options
@ -50,7 +50,7 @@ export function startWebserver(config: any) {
else res.status(404).type("txt").send("404");
});
app.listen(3430, "0.0.0.0", () => {
app.listen(config.port, "0.0.0.0", () => {
console.log("Webserver running on port 3430");
});
}

View File

@ -1,5 +1,5 @@
<!-- Page title -->
{% assign pageTitle = "boom" %}
{% assign pageTitle = "MangoRecipe" %}
<!-- Metadata tagline -->

View File

@ -6,6 +6,6 @@ export class MangoRecipe {
// Starts webservers at first boot
constructor() {
this.config = config;
startWebserver(this);
startWebserver(config.webapp);
}
}

17
config.example.json Normal file
View File

@ -0,0 +1,17 @@
{
"defaultLocale": "en",
"webapp": {
"cookieSecure": false,
"port": 6000,
"redirectURI": "http://localhost:6000/auth/callback"
},
"database": {
"db": "mangorecipe",
"host": "",
"password": "",
"port": 5432,
"user": ""
}
}

View File

@ -1 +1,17 @@
{}
{
"defaultLocale": "en",
"webapp": {
"cookieSecure": false,
"port": 3440,
"redirectURI": "http://localhost:6000/auth/callback"
},
"database": {
"db": "mangorecipe",
"host": "",
"password": "",
"port": 5432,
"user": ""
}
}