Getting Started - UoGSOCIS/website GitHub Wiki

This is a list of steps to take to get started on the project:

  1. Clone the repository

  2. Install nodejs for your platform

  3. Install mongodb

  4. run npm install to download all the dependancies

  5. stop git from tracking the config file changes git update-index --assume-unchanged config.ini

  6. Generate certificates

    Mac or Linux or windows from git-bash or the linux sub system:

    1. generate RSA keys for running the tests

    mock google certificates:

    openssl genrsa -out test/public_mock_google.rsa 4096

    openssl rsa -in test/public_mock_google.rsa -pubout > test/public_mock_google.pem

    testing JWT certificates:

    openssl genrsa -out test/private_auth.rsa 4096

    openssl rsa -in test/private_auth.rsa -pubout > test/public_auth.pem

    1. generate RSA keys for running the the app normally

    openssl genrsa -out authentication/private.rsa 4096

    openssl rsa -in authentication/private.rsa -pubout > authentication/public.pem

  7. Create the mongo database user

Mac or Linux: mongo

Windows: c:\Program\ Files/MongoDB/Server/4.0/bin/mongo.exe

Then:

use socis;
 db.createUser({
   user: "socisUser",
   pwd: "socisPassword",
   roles: [{
     role: "readWrite",
     db: "socis"
   }]
 });

// the testing db account
use mocha_test;
 db.createUser({
   user: "testUser",
   pwd: "testPassword",
   roles: [{
     role: "readWrite",
     db: "mocha_test"
   }]
 });
  1. Set the aud value in the config.ini file to the google client id

voila now you can run the website!