Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

SmoglyMonitor/smogly-frontend

Repository files navigation

Build Status Coverage Status

smogly-frontend

Frontend for SmoglyAirMonitor project. Powered by React

Useful commands

  • npm run build - build files to be used for production
  • npm run start - run a test server with hot reload on localhost:8080
  • npm run test - run tests
  • npm run test:watch - run tests continuously
  • npm run coverage - run coverage report

Development with Docker

To start development:

  1. install docker and docker-compose

  2. copy docker-compose.yml to root project dir to have Your own local copy

    cp ./docker/docker-compose.yml ./docker-compose.yml

To run project:

  1. docker-compose up - start webpack-dev-server with hot reloading and log output, you need to wait a bit for package.json requirements to download
  2. point your browser to localhost:8081
  3. press CTRL+C to stop

Notes:

  1. Each change in the code should be reflected automatically in Your browser.
  2. To run one off package.json configured command just do docker-compose run --rm web npm run YOUR_CMD.
  3. To get into shell of container to debug docker-compose run --rm web bash.
  4. Executing container will automatically prune and install new dependencies from packages.json rebuilding is not needed.
  5. To change ENV variables check this docker-compose manual + defaults set in Dockerfile.
  6. 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: web
    command: "npm run build:watch"
  1. We recommend setting up bash aliases to increase productivity:
#!/bin/bash
dcclear() {
    docker images -qf dangling=true | xargs -r docker rmi
    docker volume ls -qf dangling=true | xargs -r docker volume rm
}
alias dc='docker-compose'
alias dcrun='docker-compose run --rm'

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •