Skip to content

Troubleshooting

The most common malfunctions that may come up when using the Gowebly CLI.

🤔 Can't find the answer here?

Feel free to create an issue or start a discussion in the Gowebly project repository. And, of course, we would be happy if you could send a PR with suggestions for improving the docs.

Port X is taken by OS

Some operating systems may take up ports that you want to use to develop and deploy your application. You can check if a port is taken by OS by running the command:

bash
lsof -iTCP -sTCP:LISTEN -P
bash
lsof -iTCP -sTCP:LISTEN -P
bash
netstat -aon

There are two ways to change it.

  1. Set the port number in the BACKEND_PORT environment variable before running:
bash
BACKEND_PORT=9000 gowebly run
yaml
# docker-compose.yml

services:
  gowebly_default:
    # ...
    ports:
      - '9000:9000'
    environment:
      BACKEND_PORT: 9000 # same as the exposed container port
    # ...

# ...
  1. Edit the port number in the server.go file:
go
// runServer runs a new HTTP server with the loaded environment variables.
func runServer() error {
	// Validate environment variables.
	port, err := strconv.Atoi(gowebly.Getenv("BACKEND_PORT", "9000"))
	if err != nil {
		return err
	}

	// ...

Now, you can open your browser and go to the http://localhost:9000.

Gowebly CLI is 100% free and Open Source project under the Apache 2.0 license.
Official logo distributed under the Creative Commons License (CC BY-SA 4.0 International).