Skip to content

Troubleshooting

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

🤔 Не можете найти ответ здесь?

Не стесняйтесь создать issue или начать discussion в репозитории проекта Gowebly. И, конечно, мы будем рады, если вы пришлете PR с предложениями по улучшению документации.

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).