mirror of
https://github.com/screego/server.git
synced 2025-12-24 12:57:51 +08:00
1.6 KiB
1.6 KiB
Development
Screego requires:
- Go 1.15+
- Node 13.x
- Yarn 9+
Setup
Clone Repository
Clone screego/server source from git:
$ git clone https://github.com/screego/server.git && cd server
GOPATH
If you are in GOPATH, enable go modules explicitly:
$ export GO111MODULE=on
Download Dependencies:
# Server
$ go mod download
# UI
$ (cd ui && yarn install)
Start / Linting
Backend
Create a file named screego.config.development.local inside the screego folder with the content:
SCREEGO_EXTERNAL_IP=YOURIP
and replace YOURIP with your external ip.
Start the server in development mode.
$ go run . serve
The backend is available on http://localhost:5050
?> When accessing localhost:5050 it is normal that there are panics with no such file or directory.
The UI will be started separately.
Frontend
Start the UI development server.
Commands must be executed inside the ui directory.
$ yarn start
Open http://localhost:3000 inside your favorite browser.
Lint
Screego uses golangci-lint for linting.
After installation you can check the source code with:
$ golangci-lint run
Build
-
Build the UI
$ (cd ui && yarn build) -
Build the binary
go build -ldflags "-X main.version=$(git describe --tags HEAD) -X main.mode=prod" -o screego ./main.go