Backend

Build the Backend API

Build using Makefile

To build the backend you can simply use the provided Makefile. Possible make targets to build the backend are:

  • build-linux_64
  • build-linux_386
  • build-mac
  • build-armv5
  • build-armv6
  • build-armv7 (Raspberry Pi 3 + 4)
  • build-armv8_64

So if you want to build on linux you for example issue:

❯ make build-linux_64
[*] go mod dowload
[*] Building for linux x64
[OK] App binary was created!
[OK] Your backend binary is at ./dist/<os>/

Now you have a binary ready to use:

dist
└── linux_amd64
    └── dascr-board

Windows?

In Windows you can also build this project. I tested it using MSYS2. After installing this I followed this instructions to setup my MSYS2 environment.

After setting up accordingly you can build like (from root directory of project within MSYS2 cli):

go mod download
go build -o dist/windows_amd64/dascr-board.exe

What’s next?

You could either run it right now using the Makefile (which will use the previously created .env file) and issue make run-dev-backend or run it like so (from the ./dist/<os>/ folder):

API_IP=0.0.0.0 API_PORT=8000 DEBUG=FALSE ./dascr-board

Want to have a Web UI?

  • Frontend: Go ahead and build the frontend