Skip to content

Commit 54f6919

Browse files
committed
add some info to readme
1 parent 64adb6c commit 54f6919

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,38 @@
11

22
# HBM scan web app
3+
4+
[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.
35+
36+
```sh
37+
make release
38+
```

0 commit comments

Comments
 (0)