-
Clone or fork repo
-
Configuration
$ cp server/config.js.template server/config.js
- Populate the values in
server/config.js
$ cp client/config.js.template client/config.js
- Populate the values in
client/config.js
-
Node setup
-
$ nvm use
This will use the nvm version assigned for this project.
Notes:
nvm
may instruct you to install a new version of Node; follow instructions as necessary. Runnvm use
again after installing a new version.- You will need to run
nvm use
whenever you open a new shell for this project.
-
$ npm run setup
This will accomplish a number of things:
-
install all node modules and dependencies
-
create and seed the development PostgreSQL database:
boxcharter_dev
Note: This database will be destroyed and overwritten if it already exists! -
create the test PostgreSQL database:
boxcharter_test
Note: This database will be destroyed and overwritten if it already exists!
-
-
-
Start servers
-
Start two separate shells
-
In one of the shells, cd into the
client
directory; in the other cd into theserver
directory. -
In each directory, run
$ nvm use
-
In each directory, run
$ npm run dev:start
Notes:
- The advantage of running these separately is to have separate output for each server.
- These scripts use
nodemon
start both the React client / Node Express server in a way that will reload on changes to the code.
-