-
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 useThis will use the nvm version assigned for this project.
Notes:
nvmmay instruct you to install a new version of Node; follow instructions as necessary. Runnvm useagain after installing a new version.- You will need to run
nvm usewhenever you open a new shell for this project.
-
$ npm run setupThis will accomplish a number of things:
-
install all node modules and dependencies
-
create and seed the development PostgreSQL database:
boxcharter_devNote: This database will be destroyed and overwritten if it already exists! -
create the test PostgreSQL database:
boxcharter_testNote: 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
clientdirectory; in the other cd into theserverdirectory. -
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
nodemonstart both the React client / Node Express server in a way that will reload on changes to the code.
-