mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-27 21:00:42 +03:00
feat (server): add support for setting listening host (#2604)
This commit is contained in:
@@ -198,6 +198,7 @@ export async function getAllChatFlow(): Promise<IChatFlow[]> {
|
||||
export async function start(): Promise<void> {
|
||||
serverApp = new App()
|
||||
|
||||
const host = process.env.HOST
|
||||
const port = parseInt(process.env.PORT || '', 10) || 3000
|
||||
const server = http.createServer(serverApp.app)
|
||||
|
||||
@@ -208,8 +209,8 @@ export async function start(): Promise<void> {
|
||||
await serverApp.initDatabase()
|
||||
await serverApp.config(io)
|
||||
|
||||
server.listen(port, () => {
|
||||
logger.info(`⚡️ [server]: Flowise Server is listening at ${port}`)
|
||||
server.listen(port, host, () => {
|
||||
logger.info(`⚡️ [server]: Flowise Server is listening at ${host ? 'http://' + host : ''}:${port}`)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user