-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
does multiple bot support #40
Comments
use a reverse proxy like caddy for that |
Hello, if the bot is execute on same server / instance first need to check if port is free, export const getFreePort = (): Promise<number> => {
return new Promise((resolve, reject) => {
const server = require('net').createServer()
server.unref()
server.on('error', reject)
server.listen(() => {
const port = server.address().port as number
server.close(() => {
resolve(port)
})
})
})
}
const port = await getFreePort()
inventoryViewer(bot, { port }) Second if yo want to share all bots using same port (80 / 443 secured) you need made a reverse proxy with express (this part is a more bit complicated) In my bot i use socket.io to connect to the server, there is the map |
Can multiple bot instances be supported? like using the same port 80 and using different web paths to view them
The text was updated successfully, but these errors were encountered: