Getting Started - UoGSOCIS/website GitHub Wiki
This is a list of steps to take to get started on the project:
-
Clone the repository
-
Install nodejs for your platform
-
Install mongodb
-
run
npm install
to download all the dependancies -
stop git from tracking the config file changes
git update-index --assume-unchanged config.ini
-
Generate certificates
Mac or Linux or windows from
git-bash
or the linux sub system:- 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
- 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
-
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"
}]
});
- Set the
aud
value in theconfig.ini
file to the google client id
voila now you can run the website!