zrok/BUILD.md

27 lines
1.3 KiB
Markdown
Raw Normal View History

# Build
2023-01-27 17:42:58 +01:00
## zrok
2023-08-28 23:14:01 +02:00
At this time, building `zrok` is pretty straightforward. You will require `node` v16+ to be installed in order to complete the build as well as `go`. Because `zrok` uses CGO, you will also need to have a working C compiler toolchain. [TDM-GCC](https://jmeubank.github.io/tdm-gcc/download/) works great on Windows (just make sure it's in your PATH).
2023-01-27 17:42:58 +01:00
To build, follow these steps:
* clone the repository
2023-01-30 19:45:12 +01:00
* change to the existing `ui` folder
* run `npm install`
2023-01-27 17:42:58 +01:00
* run `npm run build` (this process takes a while the first time and only needs to be run if the ui changes)
* change back to the checkout root
2024-04-18 13:59:08 +02:00
* make sure the dist directory exists: `mkdir -p dist`
2023-01-27 17:42:58 +01:00
* build the go project normally: `go build -o dist ./...`
## Documentation/Website
The doc website is based on [Docusaurus](https://docusaurus.io/) which in turn will require `npm` to be installed. `yarn`
is another tool which is used to start the Docusaurus dev site.
To build the doc:
* cd to `website`
* run `yarn install` (usually only needed once)
* run `yarn start` to start the development server (make sure port 3000 is open or change the port)
The development server infrequently behaves differently than the 'production' build. If you must use the 'production'
build it is slower, but you can accomplish that with `yarn build`.