Skip to content

GiorgioMor/wasa

Repository files navigation

Fantastic coffee (decaffeinated)

This repository contains the basic structure for Web and Software Application homework project. It has been described in class.

"Fantastic coffee (decaffeinated)" is a simplified version for the WASA course, not suitable for a production environment. The full version can be found in the "Fantastic Coffee" repository.

Project structure

  • cmd/ contains all executables; Go programs here should only do "executable-stuff", like reading options from the CLI/env, etc.
    • cmd/healthcheck is an example of a daemon for checking the health of servers daemons; useful when the hypervisor is not providing HTTP readiness/liveness probes (e.g., Docker engine)
    • cmd/webapi contains an example of a web API server daemon
  • demo/ contains a demo config file
  • doc/ contains the documentation (usually, for APIs, this means an OpenAPI file)
  • service/ has all packages for implementing project-specific functionalities
    • service/api contains an example of an API server
    • service/globaltime contains a wrapper package for time.Time (useful in unit testing)
  • vendor/ is managed by Go, and contains a copy of all dependencies
  • webui/ is an example of a web frontend in Vue.js; it includes:
    • Bootstrap JavaScript framework
    • a customized version of "Bootstrap dashboard" template
    • feather icons as SVG
    • Go code for release embedding

Other project files include:

  • open-npm.sh starts a new (temporary) container using node:lts image for safe web frontend development (you don't want to use npm in your system, do you?)

Go vendoring

This project uses Go Vendoring. You must use go mod vendor after changing some dependency (go get or go mod tidy) and add all files under vendor/ directory in your commit.

For more information about vendoring:

Node/NPM vendoring

This repository contains the webui/node_modules directory with all dependencies for Vue.JS. You should commit the content of that directory and both package.json and package-lock.json.

Docker

You can build and run the project with Docker

  • Backend
docker build -t homework-backend:latest -f Dockerfile.backend .
docker run -it -p 3000:3000 --rm homework-backend:latest
  • Frontend
 docker build -t homework-frontend:latest -f Dockerfile.frontend .
 docker run -it -p 8080:80 --rm homework-frontend:latest

License

See LICENSE.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published