An application for managing billing data for consulting projects
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.
Run:
$ npm install
Virtual Machine:
vagrant plugin install vagrant-exec
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
.
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.
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