These steps are for an install on a Mac. The Windows instructions are here.
First check the .nvmrc
file to make sure you have the correct version of Node.js installed. You can install it using several tools - NVM, Nodenv, or ASDF
To use NVM, follow the install directions at https://github.com/nvm-sh/nvm#install--update-script. Once installed, you can run nvm install
to install the correct version of Node.js.
You can manually specify a version with
nvm install v16.14.0
nvm use v16.14.0
If using Nodenv follow the instructions here to install, then run run nodenv install
.
Make sure to use new terminals after completing install
Install ASDF using the instructions here, then:
asdf plugin add nodejs
asdf install nodejs 16.14.0
asdf local nodejs 16.14.0
See ./setup-gmail.md for instructions on setting up Gmail to send emails.
-
Install dependencies
The scripts will install yarn and download npm dependencies for all yarn workspaces.
cd usdr-gost/ npm i yarn@^1.22.4 -g yarn run setup
-
Create database(s)
Install postgres DB. I personally used https://postgresapp.com/
psql -h localhost -p 5432 CREATE DATABASE usdr_grants; CREATE DATABASE usdr_grants_test;
-
Setup ENVs
Copy packages/client & packages/server
.env.example
to.env
cp packages/client/.env.example packages/client/.env cp packages/server/.env.example packages/server/.env
Note: In order to login, the server must be able to send email. Set the relevant environment variables under
# Email Server:
inserver/.env
to credentials for a personal email account (e.g. for Gmail, see [Getting Startd], with more info here) from Google. -
Setup Gmail (See GMail setup instructions for info on setting up gmail to send emails. You will need to set this up in order to log into the app!
-
Run DB Migrations & Seed
In server workspace, run migrations and seeds:
cd packages/server export $(cat .env) #delete all comment lines in .env file yarn db:migrate yarn db:seed
or, from the top-level directory:
yarn workspace server run db:seed