config server_port

This commit is contained in:
qwertyforce 2020-09-22 21:03:22 +03:00
parent 2cc2deab1f
commit 0eb65ac810
2 changed files with 4 additions and 3 deletions

View File

@ -10,5 +10,6 @@ export default {
GITHUB_REDIRECT_URI: "http://localhost/auth/github/callback",
gmail_user:"auth.test.reg.email@gmail.com",
gmail_password:"sbuLBh9rAV8XD2",
mongodb_url:"mongodb://localhost/"
mongodb_url:"mongodb://localhost/",
server_port:"80"
}

View File

@ -18,7 +18,7 @@ import config from '../config/config'
const PASS_MIN = 8;
const PASS_MAX = 128;
const port = parseInt(process.env.NODE_PORT||"80")
const port = parseInt(process.env.NODE_PORT||config.server_port)
const dev = process.env.NODE_ENV !== 'production'
const next_app = next({ dev })
const handle = next_app.getRequestHandler()
@ -143,6 +143,6 @@ next_app.prepare().then(() => {
app.set('trust proxy','127.0.0.1')
app.listen(port,'localhost', (err) => {
if (err) throw err
console.log(`> Ready on ${config.domain}:${port}`)
console.log(`> Ready on ${port}`)
})
})