A prototype web application for demonstrating the transition to a digital form management system.
- Latest Node 6 LTS
- Latest MongoDB 3.4
- NPM version 3.10 or later
curl -L https://git.io/n-install | bash
- Install n (node version manager)
- @see - https://github.com/tj/n
n
- Choose the version of node you would like to run
- For now, choose the latest version available to you
- Also, read n's documentation to learn how to install more recent versions of node
npm install -g mongodb-version-manager
- Install mongodb version manager
- Ensure mongo is accessible in your $PATH
m use 3.4
- Use MongoDB 3.4
npm i
- Install the project's node dependencies
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
sudo apt-get update
sudo apt-get install -y mongodb-org
- @todo - production deployment of node - perhaps nodesource?
npm i
Note that each of these commands should be run in a separate terminal
sudo mongod
- If this doesn't work, ensure you followed the step above that adds mongo to your $PATH
npm run start-dev
npm run build-dev
sudo service mongod start
- @todo
Arguments:
db_name
- the name of the database you would like to back up. defaults toagencyPortal
dump_dir
- the directory to put the back up in. defaults to~/dumps/database/[db_name]
Examples:
npm run backup-db
- The directory
~/dumps/database/agencyPortal
will be created if it does not already exist - A
.tar.gz
file will be created in that directory with a filename of the timestamp at which the command was run
- The directory
Arguments:
file_name
- the path to the.tar.gz
file (preferably one that was generated usingnpm run backup-db
) that contains the database to be restoreddb_name
- the name of the database to retore. defaults toagencyPortal
Examples:
npm run restore-db ~/Downloads/2017_05_02_1493769858.tar.gz
- Will restore the database dump contained in
2017_05_02_1493769858.tar.gz
to the databaseagencyPortal
- Will restore the database dump contained in
Run this command to start the server that serves the client-side files and proxies requests to the api server. By default, the application will be available at this url:
Run this command to start the server that serves the api. By default, the base url for the api will be:
- implement approvals
- set up eslint locally
- add deletion confirmation modal in admin section
- Admin Section Form CRUDI
- add a favicon
- fix console errors at first page load
- Make restore-db run backup-db first, to ensure it is non-destructive
- take advantage of multiple cpus by spawning workers
- implement logging
- implement error handling