forked from dachan/dach
		
	changed location of settings to env file
This commit is contained in:
		@@ -1,5 +1,4 @@
 | 
			
		||||
const express = require('express');
 | 
			
		||||
const settings = require('../settings.json');
 | 
			
		||||
const { Client } = require('pg');
 | 
			
		||||
const session = require('express-session');
 | 
			
		||||
const dotenv = require('dotenv');
 | 
			
		||||
@@ -13,7 +12,7 @@ dotenv.config({ path: './web.env' });
 | 
			
		||||
 | 
			
		||||
const db = new Client({
 | 
			
		||||
    user: process.env.DB_USER,
 | 
			
		||||
    host: "127.0.0.1",
 | 
			
		||||
    host: "db",
 | 
			
		||||
    database: process.env.DB_NAME,
 | 
			
		||||
    password: process.env.DB_PASS,
 | 
			
		||||
    port: 5432
 | 
			
		||||
@@ -45,7 +44,7 @@ const init = async () => {
 | 
			
		||||
 | 
			
		||||
let tokens = {};
 | 
			
		||||
 | 
			
		||||
app.set('views','/usr/share/dach/public');
 | 
			
		||||
app.set('views','./public');
 | 
			
		||||
app.use(express.static('public'));
 | 
			
		||||
app.set('view engine', 'ejs');
 | 
			
		||||
app.use(express.urlencoded({ extended: true }))
 | 
			
		||||
@@ -120,6 +119,6 @@ app.post('/api/createBoard', async (req, res) => {
 | 
			
		||||
    return res.status(200).send("Борда успешно создана");
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
app.listen(settings.port, () => {
 | 
			
		||||
app.listen(process.env.APP_PORT, () => {
 | 
			
		||||
    console.log("App started");
 | 
			
		||||
});
 | 
			
		||||
		Reference in New Issue
	
	Block a user