How to deploy a NodeJS consumer in Azure
Hi all,
I have a consumer/producer NodeJS app I've created that connects to an event broker using the WebSocket protocol. The app on it's own works exactly how it's intended, but I'm unsure on how to deploy this in Azure. I attempted to use the App Service but the app keeps getting terminated and restarted. My assumption here is that the App Service is for web apps and Azure expects the app to be listening on the port specified in the PORT environment variable, but my app doesn't accept web requests because that's not the point of it. It's meant to connect to an event broker and consume events.
Am I using the wrong Azure service? Should I be configuring the app in a different way? Some help would be amazing. Thanks much!
Best Answer
-
Hey so I've never worked with App Service but based on the docs here:
... it does seem that App Service expects your app to be listening on either port 80 or a custom configured port, and then respond to requests there.
What it seems you want to do is just run a container. Azure has a few options for that listed in the docs below:
You're right though — your app would not need to be listening on a port to connect to Solace. BUT you have to be sure that wherever your app gets deployed has network access to the Solace host:port URL. Defaults for WS is 8008, WSS is 1443.
2
Answers
-
Hey so I've never worked with App Service but based on the docs here:
... it does seem that App Service expects your app to be listening on either port 80 or a custom configured port, and then respond to requests there.
What it seems you want to do is just run a container. Azure has a few options for that listed in the docs below:
You're right though — your app would not need to be listening on a port to connect to Solace. BUT you have to be sure that wherever your app gets deployed has network access to the Solace host:port URL. Defaults for WS is 8008, WSS is 1443.
2 -
@andrew I ended up deploying to azure containers as you indicated
0