feature: how to open two or many port for app?
itildesk opened this issue · 4 comments
itildesk commented
Description
sometimes biz require more than one port buffalo support this feature?
Additional Information
No response
pierredup commented
@itildesk Do you want to run the same app on multiple ports, with the same routes?
If that is the case, then you can just update your cmd/app/main.go
file to run multiple servers with different ports
func main() {
app := actions.App()
appOne := servers.New()
appTwo := servers.New()
appOne.Addr = ":3000"
appTwo.Addr = ":3001"
if err := app.Serve(appOne, appTwo); err != nil {
log.Fatal(err)
}
}
itildesk commented
@pierredup thanks for your suggest,I followed what you said, the program has an additional access entrance, and the background process has not changed.
github-actions commented
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment. Otherwise, this will be closed in 7 days.
github-actions commented
This issue was closed because it has been stalled for 30+7 days with no activity.