This code represents a demo environment for a web application. It consists in a backend written in Go and a frontend built on top of Angular.
Please note: Golang 1.9 or above required (https://golang.org/doc/install).
cd ./backend
go build -o api
./api
APIs will then be served on
localhost:9000
Please note: Node 8.9 or above required (https://nodejs.org/en/download/).
(Want to run multiple node versions? Please take a look at https://github.com/tj/n)
cd ./frontend
npm install
./node_modules/.bin/ng serve --open
Frontend will then be served on
localhost:4200
Move to branch docker
and build containers
git checkout docker
sudo docker-compose build
sudo docker-compose run backend /app/backend/backend.test
The command:
sudo docker-compose up --build
will run two containers:
- Go API
- Front-end unit and e2e tests.
You can also override the command using the --entrypoint
option:
sudo docker-compose run --entrypoint="npm run e2e" frontend