Skip to content

bocoup/nest-weekly-review

Repository files navigation

Weekly Review Status on TravisCI

An application for managing billing data for consulting projects

Developing

If you'd like to work on this project, you can either manually install its dependencies on your local machine or use a virtual machine (via Vagrant) to run the application in a sandboxed environment. Instructions for each are provided below.

For practical details on application architectural, testing strategy, and build optimization, please see the contributing.md file.

Installation

Run:

$ npm install

Virtual Machine:

  • Ansible
    • via pip (All Platforms): pip install ansible
    • via homebrew (OSX) brew install ansible
    • Linux: apt-get/yum install ansible
  • VirtualBox (download)
  • Vagrant (download)
  • Vagrant "exec" plugin (all platforms): vagrant plugin install vagrant-exec

Running (production)

To run in your development environment, execute the following command:

$ npm start

...and visit http://localhost:8000

To run within a virtual machine, execute the following command:

$ vagrant up

...and visit http://192.168.33.31

The NODE_PORT environmental variable allows for runtime configuration of the TCP/IP port to which the HTTP server should be bound. Defaults to 8000.

Running (development)

To run the application in development mode, execute the following command:

$ npm run start-dev

In addition to NODE_PORT (see above), this mode allows for runtime configuration of the application's dependencies on external services. This is useful for offline development and testing. The following environmental variables will alter the application's behavior if set prior to running the server:

  • WR_API - the "base" URL the client should use to make dynamic requests for data. By default, the value http://api.bocoup.com will be used, but this may be set to a staging server or a local installation of the Nest API server.
  • WR_BYPASS_AUTH - when set to any value, the application will self-authorize. This only makes sense in contexts where WR_API references a permissive server instance (i.e. a local installation of the API).

The default and current values of all recognized variables are printed to the console each time the application is initialized.

Deployment

To provision the production server environment, execute the following command from the deploy/ansible/ directory:

$ ansible-playbook -i inventory/production provision.yml

This command only needs to be run when initially configuring a new environment or when making changes to the application that modify system-wide settings.

During deployment, code is sourced from the upstream git repo. Execute the following command from the deploy/ansible/ directory:

$ ansible-playbook -i inventory/production deploy.yml

About

An application for managing billing data for consulting projects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published