You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[HBM scan](https://github.com/HBM/scan-spec) implemented in Go. Results are served via JSON to a frontend written in React. All you need is a web browser.
5
+
6
+
## Goal
7
+
8
+
1. A single binary for multiple platforms (Windows, Linux, Mac)
9
+
1. No dependencies on target system (no Java, no Docker, no Go, no nothing)
10
+
1. No installation required. Simply use the binary for your platform.
11
+
12
+
## Development
13
+
14
+
The app is written in Go.
15
+
16
+
One goroutine starts a simple HTTP web server and serves all files from the `/public` folder. When `mode` is set to production all files from the `/public` folder are embedded into the Go executable using [statik](https://github.com/rakyll/statik). The web server also provides a `/json` endpoint for the frontend.
17
+
18
+
A second goroutine starts an infinte loop and listens for incoming UDP messages. All raw JSON messages are converted into proper types/struct and stored in an in-memory database. If devices stop announcing themselves they are removed from the database.
19
+
20
+
Start the app in development mode by using the following two commands. First of all transpile and bundle the JavaScript code.
21
+
22
+
```sh
23
+
npm run watch
24
+
```
25
+
26
+
Then run the backend in `development` mode using the transpiled `/public/main.js` bundle.
27
+
28
+
```sh
29
+
make dev
30
+
```
31
+
32
+
## Release
33
+
34
+
To build a new release and binaries for each platform simply run the following command.
0 commit comments