Use a custom port
In most cases you don't need to change the default port that Deploio chooses
for your app. The chosen port will be injected as the env variable $PORT
to
the application at runtime. So in any case, for compiled languages you have to
make sure the app is listening on the port defined in that env variable. For
other languages such as Ruby, PHP, NodeJS or Python this will be automatically
taken care of.
Setting a custom port on app creation
If you need to customize the port, you can configure it using the --port
flag of
nctl
:
--port=8080 Port the app is listening on.
$ nctl create app go-example --port=5678
Updating the port of an application
For already existing applications you can use nctl update app
with the
--port
flag to update the port.
$ nctl update app go-example --port=5678