diff --git a/Source/Webserver/index.ts b/Source/Webserver/index.ts index e47ff1c..a1cda97 100644 --- a/Source/Webserver/index.ts +++ b/Source/Webserver/index.ts @@ -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"); }); } diff --git a/Source/Webserver/views/index.liquid b/Source/Webserver/views/index.liquid index a83abc5..3b06731 100644 --- a/Source/Webserver/views/index.liquid +++ b/Source/Webserver/views/index.liquid @@ -1,5 +1,5 @@ -{% assign pageTitle = "boom" %} +{% assign pageTitle = "MangoRecipe" %} diff --git a/Source/classes/Main.ts b/Source/classes/Main.ts index da8855d..b50e513 100644 --- a/Source/classes/Main.ts +++ b/Source/classes/Main.ts @@ -6,6 +6,6 @@ export class MangoRecipe { // Starts webservers at first boot constructor() { this.config = config; - startWebserver(this); + startWebserver(config.webapp); } } diff --git a/config.example.json b/config.example.json new file mode 100644 index 0000000..b3b7d54 --- /dev/null +++ b/config.example.json @@ -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": "" + } +} \ No newline at end of file diff --git a/config.json b/config.json index 9e26dfe..286ec89 100644 --- a/config.json +++ b/config.json @@ -1 +1,17 @@ -{} \ No newline at end of file +{ + "defaultLocale": "en", + + "webapp": { + "cookieSecure": false, + "port": 3440, + "redirectURI": "http://localhost:6000/auth/callback" + }, + + "database": { + "db": "mangorecipe", + "host": "", + "password": "", + "port": 5432, + "user": "" + } +} \ No newline at end of file