MikeRudi
(Mike Rudi)
1
Issues information
Your issue
im struggling to identify my port. I have a node.js application on github, do you know how i access what port its using?
Hi @MikeRudi ,
Do you use Buildpacks or Dockerfile?
Buildpacks
If you use Buildpacks, you will need to set an environment variable PORT
with the value of your choice (E.g. 3000
).
Dockerfile
You will need to set the instruction EXPOSE 3000
(you can change the port number according to the listening port of your app).
Let me know
MikeRudi
(Mike Rudi)
3
Im working with buildpacks.Node.js
Therefor I simply add the port and listen to it on my node app. and set my qovery port to 3000?
Check code below:
app.set(‘port’, process.env.PORT || 3000);
app.listen(3000);
If you use Buildpacks for your NodeJS app you simply need to:
- set the port to
3000
in your Qovery app settings
- set your environment variable
PORT
in your environment variable setting for your app
It’s perfect