DEXORDER_BIND
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
#DEXORDER_BIND=0.0.0.0
|
||||||
DEXORDER_PORT=3001
|
DEXORDER_PORT=3001
|
||||||
DEXORDER_APP_URL=http://localhost:3000
|
DEXORDER_APP_URL=http://localhost:3000
|
||||||
|
|
||||||
|
|||||||
13
main.js
13
main.js
@@ -3,15 +3,10 @@ import {httpServer} from "./io.js";
|
|||||||
import {initIO} from "./route.js";
|
import {initIO} from "./route.js";
|
||||||
|
|
||||||
|
|
||||||
// setup socket.io
|
|
||||||
|
|
||||||
initIO();
|
initIO();
|
||||||
|
|
||||||
// io.on("disconnection", (socket)=>{
|
|
||||||
// socket.leave('public') // todo isn't this automatic?
|
|
||||||
// todo unsub pools etc?
|
|
||||||
// })
|
|
||||||
|
|
||||||
const port = parseInt(process.env.DEXORDER_PORT) || 3001;
|
const port = parseInt(process.env.DEXORDER_PORT) || 3001;
|
||||||
httpServer.listen(port)
|
const bind = process.env.DEXORDER_BIND || 'localhost';
|
||||||
console.log('Started server on port '+port)
|
httpServer.listen(port, bind, ()=>{
|
||||||
|
console.log(`Started server on ${bind}:${port}`)
|
||||||
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user