emavgl / qa-empatica-demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Empatica Web Demo

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.

Backend

Please note: Golang 1.9 or above required (https://golang.org/doc/install).

Build

cd ./backend
go build -o api

Run

./api

APIs will then be served on

localhost:9000

Frontend

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)

Build

cd ./frontend
npm install

Live development

./node_modules/.bin/ng serve --open

Frontend will then be served on

localhost:4200

Run tests using docker-compose

Move to branch docker and build containers

git checkout docker
sudo docker-compose build

run back-end tests

sudo docker-compose run backend /app/backend/backend.test

Run front-end tests

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 

About


Languages

Language:TypeScript 63.6%Language:Go 29.8%Language:JavaScript 3.6%Language:HTML 2.2%Language:CSS 0.9%