Closed rstanislav closed 2 years ago
Hello @rstanislav ,
I'm glad engarde is fitting your needings. To build the binary with the embedded web interface, that is an Angular project, you'll need to have Node on your machine. You'll also need to have the Packr2 binary installed:
go get -u github.com/gobuffalo/packr/v2/packr2
Now, first of all you'll have to go in the webmanager
directory and run:
npm install
npm run build
Now, to create the file that Golang will include, you need to go to the cmd/engarde-client directory and run packr2
. Then, you go to the cmd/engarde-server directory and run packr2
again.
Now you can just build client and server as you've already done.
Since this is quite a boring process, there is also a Makefile that takes care of all of this (except building the Angular project, I don't remember why I didn't include it in the Makefile, I'll do it sooner or later).
This means that, after running the npm install
and npm run build
commands, you can just run make
from the root directory, and it will packr and build everything for you.
If lanuched without argouments, make
will build for all the platforms and architectures, if this is not what you want you can specify what to build (example: make linux-amd64
). In the Makefile you can find all the available targets.
I hope this is clear enough; if not, just let me know 👍
Hello, first - thanks for this great project, its works aswesome!
And small question - how to build client and server with builtin webserver ? I can build client and server, but they are without built in webmanager (404 error), official build do include webmanager in single binary file...
Thanks alot!