Frontend SPA for EnviroMonitor
npm run build
- build files to be used for productionnpm run start
- run a test server with hot reload on localhost:8080npm run test
- run testsnpm run test:watch
- run tests continuouslynpm run coverage
- run coverage report
- install docker and docker-compose
cp ./docker/docker-compose.yml ./docker-compose.yml
- prepare Your docker-compose.yml file, default is to run webpack-dev-server with hot reloading (translate to containernpm run start
), it should be enought to develop projectdocker-compose up
- start server container with log output,CTRL+c
to stop- check
http://localhost:8080
- each change in the code should be reflected automatically in Your browser
- to run one off
package.json
configured command just dodocker-compose run --rm server YOUR_CMD
- to get into shell of container to debug
docker-compose run --rm --entrypoint=/bin/sh server
- executing container will automatically prune and install new dependencies from
packages.json
rebuilding is not needed - to change ENV variables check this docker-compose
manual + defaults set in
Dockerfile
- to add more concurrent execution of
packages.json
commands just add entry in Your copied docker-compose.yml like so:
builder:
extends:
file: docker-compose-base.yml
service: base
command: "build:watch"