Search code examples
node.jsamazon-web-servicesamazon-ec2amazon-elastic-beanstalkamazon-route53

Elastic Beanstalk running multiple api's on different ports


I have a Nodejs app that includes both an express api and a web socket api. The express app runs on port 3000 and the web socket api on port 3001. I have the entire node app running on an elastic beanstalk instance and want the express app to be accessed via the subdomain api.example.com and the web socket api via ws.example.com. How can I achieve this using route 53 and elastic beanstalk?


Solution

  • Fixed it by running both api's on the same port using the http module!