- Make sure you have Go installed. You can download it from here.
- Clone the repository
- Take a look at
config.yamland make necessary changes - Run
go run ./
The frontend server needs wss to work. To do this, you need to generate SSL certificates.
You can use the following command to generate self-signed certificates:
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes -subj "/CN=127.0.0.1"To generate certificates for a specific network (e.g., Wi-Fi address 192.168.0.104), replace CN with the desired address.
Replace the same address in the config.yaml file.
If the websocket is not connecting, visit the URL in your browser and accept the certificate. Since the certificate is self-signed, the browser will show a warning. You can ignore it and proceed to the site.
Migrations are handled by golang-migrate.
To create a new migration, run the following command:
migrate create -ext sql -dir database/migrations -seq <migration_name>To apply migrations, run the following command:
migrate -database "postgres://user:pass@host:port?sslmode=disable" -path database/migrations upTo roll back migrations, run the following command:
migrate -database "postgres://user:pass@host:port?sslmode=disable" -path database/migrations downTo check the version of the database, run the following command:
migrate -database "postgres://user:pass@host:port?sslmode=disable" -path database/migrations version