Install the CLI. See the install docs.
Log in:
runway login
Add an SSH key. See key setup, or use the shortcut:
runway local key setup
No Runway-specific setup is required for most Go programs. Clone the example:
git clone https://github.com/hostwithquantum/runway-example-go && cd runway-example-go
Runway sets the environment variable PORT, which is the port that your server
should listen on.
Create the app on Runway:
runway app create
If your repo contains multiple programs, you may have to set BP_GO_TARGETS.
The first target will be used as the main command for your app, any other
will be compiled and included in the image:
$ runway app config set BP_GO_TARGETS=./cmd/web-server:./cmd/some-debugging-programs
go generateYou can instruct Runway to add a go generate ./... step before the build via
$ runway app config set BP_GO_GENERATE=true
Since this runs after installing the dependencies, you can use
the usual Go idioms to install any tools
that your //go:generate step might use.
runway app deploy
Run runway app open to see it live, or check the Runway UI. Check runway app logs if something’s off.