English 中文(简体)
How to get Express app to use port passed with Heroku Local web command instead of port it s listening to in the code
原标题:

I m trying to deploy my express api using heroku. When I try heroku local web --port 5001, it runs the api but it still uses port 8000 instead of the port given as I have the api listening on port 8000. How can I update my code so it uses the port passed in the Heroku local web command?

app.listen(8000, () => {
    console.log("Server listening on port 8000")
});
问题回答

暂无回答




相关问题
hosting administration system?

i m looking for an opensource system to manage a list of web hosting clients. Services ordered payment notifications ticket support system That kind of stuff Is there anything like that? Thanks

Django, is possible to run two different versions?

I have a server on which I have two sites built with Django and Python, one site is major site is build with an older version of django, the other with the newer release, I have upgraded to the new ...

Ruby (off the Rails) Hosting

Many people have asked about Rails hosting on this site, but I m not familiar enough with the back end of things to know if there s a difference. I want to host some Ruby CGI webservices , basically ...

mobile network friendly host

i am developing an app for iphone, it is a client side application. and i found the 3g network is very slow, should I change the server host to a mobile network friendly host? any suggestions?

Strategies for Hosting 2 .NET Languages in Same Web App

I have 2 web sites (in Visual Studio - separate solutions) - one in VB.NET, one in C#. Ideally, I d like to make them both web application projects, compile each codebase into to a DLL, drop both ...

Deploying a python CGI app

I have developed a python CGI application which works just fine on my development box. My hosting provider however gives me little control of its server: I use a lot of custom stuff in my python ...

热门标签