mirror of
https://github.com/sasjs/server.git
synced 2026-01-03 21:10:05 +00:00
fix(prod-server): use port from configuration
This commit is contained in:
@@ -1,10 +1,9 @@
|
|||||||
import path from 'path'
|
import path from 'path'
|
||||||
import { readFileSync } from 'fs'
|
import { readFileSync } from 'fs'
|
||||||
import * as https from 'https'
|
import * as https from 'https'
|
||||||
|
import { configuration } from '../package.json'
|
||||||
import app from './app'
|
import app from './app'
|
||||||
|
|
||||||
const port = 5001
|
|
||||||
const keyPath = path.join('certificates', 'privkey.pem')
|
const keyPath = path.join('certificates', 'privkey.pem')
|
||||||
const certPath = path.join('certificates', 'fullchain.pem')
|
const certPath = path.join('certificates', 'fullchain.pem')
|
||||||
|
|
||||||
@@ -13,6 +12,8 @@ const cert = readFileSync(certPath)
|
|||||||
|
|
||||||
const httpsServer = https.createServer({ key, cert }, app)
|
const httpsServer = https.createServer({ key, cert }, app)
|
||||||
|
|
||||||
httpsServer.listen(port, () => {
|
httpsServer.listen(configuration.sasJsPort, () => {
|
||||||
console.log(`⚡️[server]: Server is running at https://localhost:${port}`)
|
console.log(
|
||||||
|
`⚡️[server]: Server is running at https://localhost:${configuration.sasJsPort}`
|
||||||
|
)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user