package
0.0.0-20230331104138-f52eec7e26e5
Repository: https://github.com/liamchampton/tech-days.git
Documentation: pkg.go.dev

# README

Frontend

The FE for this experimental application is built with Go & GopherJS. GopherJS generates JavaScript from Go code and outputs it in the /scripts directory.

Pre-requisites

Environment variables

The FE requires the URL for the backend. This should be exported as:

$ export BACKEND_URL=XXX

Once this is exported, run make generatescripts for the frontend app to compile.

Build locally

Run make buildfrontend. This command will create the runnable frontend.exe in the project root directory.

Run locally

Run make runfrontend. This command will build the frontend and then immediately execute it.

Generate scripts

Once changes to the /frontend/scripts/scripts.go are made, the JS files will need to be regenerated. Run make generatescripts to generate these.

Run in Docker

Ensure that your variables are exported as detailed in Environment variables.

$ cd frontend
$ docker build -f Dockerfile -t frontend --build-arg BACKEND_URL=$BACKEND_URL .
$ docker run -dt -p 4321:4321/tcp frontend

NOTE: Use --platform linux/amd64 in the docker build command when pushing to Azure.

# Packages

No description provided by the author
No description provided by the author