This project was made for the Web and Software Architecture course in my bachelor's degree in Computer Science.
The APIs are available inside the doc/api.yaml
file.
To build the backend without embedding the WebUI into the final executable, run
go build ./cmd/webapi/
if you want to embed the WebUI, instead run
./open-npm.sh
npm run build-embed
exit # exiting out of the npm container
go build -tags webui ./cmd/webapi/
and if you want to embed it in release mode, run
./open-npm.sh
npm run build-prod
exit # exiting out of the npm container
go build -tags webui ./cmd/webapi/
To build (and run) the frontend in development mode, run
./open-npm.sh
npm run dev
if you need the release mode, instead run
./open-npm.sh
npm run preview
To build the backend Docker container, run
docker build -t wasa-photos-backend:latest -f Dockerfile.backend .
and to run the container image, run
docker run -it --rm -p 3000:3000 wasa-photos-backend:latest
To build the frontend Docker container, run
docker build -t wasa-photos-frontend:latest -f Dockerfile.frontend .
and to run the container image, run
docker run -it --rm -p 8081:80 wasa-photos-frontend:latest