Server side code for sigmate services.
brew install mysql
mysql_secure_installation
mysql.server startDownload MySQL server (community edition)
npm install# Generate the keys
git clone https://github.com/teamfacade/sigmate-security.git
cd sigmate-security
cd jwt-secret
./gen-jwt-secret.sh
# Replace $SIGMATE_BACKEND_PATH with the actual path to the sigmate-backend repo
# Move the keys to the correct location
mkdir $SIGMATE_BACKEND_PATH/keys
mv *.pem $SIGMATE_BACKEND_PATH/keys/NODE_ENV=
PORT=
DB_DATABASE=
DB_USERNAME=
DB_PASSWORD=
DB_HOST=
DB_PORT=
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
PATH_PUBLIC_KEY=keys/cert.pem
PATH_PRIVATE_KEY=keys/private-key.pemCreate a database as with the same name as the environment variable DB_DATABASE. Replace DB_DATABASE with the actual database name.
CREATE DATABASE `DB_DATABASE`;Uses ts-node and nodemon to compile Typescript in just-in-time, and automatically re-build and restart the server on code change.
npm run devCompile the entire Typescript code base into JavaScript before running the server. Longer build times are expected, but the server is more responsive.
npm run build
npm run start