This README is intended for programmers who already have experience with React or Django.
-
Make sure you have access to all the environmental credientials.
-
Set up your environment. install python3, pip3, virtualenv. Then in your virtualenv, install django, node, postgresql.
-
Git clone the repo in your virtualenv.
-
Cd into the project(where there is a requirement.txt file) and run
pip3 install -r requirements.txt
to install all django related packages. -
Then in the same folder(where there is a package.json file), run
npm install
to install all react related packages. -
Replace the modified package. Cd into
node_modules
folder and remove the folderreact-s3-uploader
, this is the official version. Cd intohirebeat/hirebeat
and find a folder calledreact-s3-uploader
, this is the modified version which is used by our app. Runcp -r react-s3-uploader ../../node_modules/
to copy the folder. Besides, cd intonode_modules
and remove the folderreact-quiz-component
, this is the official version. Cd intohirebeat/hirebeat
and find a folder calledreact-quiz-component
, this is the modified version which is used by our app. Runcp -r react-quiz-component ../../node_modules/
to copy the folder. -
Make sure postgresql is running and create a user. Put the username and password in database session of the django settings file.
-
Touch a file in the project root dir called
.env
and copy paste environmental credentials. SetBucket=hirebeat-test-video-bucket
in the.env
file andvar url = "https://hirebeat-test-video-bucket.s3.amazonaws.com/" + name;
inMyVideoUploader.js
file when run in local. -
Migrate database changes. Run
pip3 install psycopg2
then,python3 manage.py migrate
. -
Run
npm run dev
to build the webpack bundle html file. -
Open django admin site to add one question to each category.(Needed for practice).
-
Run the app using
python3 manage.py runserver --insecure
. (This --insecure flag is required as django debug mode is turned off).
Comment out
console.log = function () {};
console.error = function () {};
console.exception = function () {};
console.warn = function () {};
in hirebeat/frontend/src/index.js
Copyright @2020 Hirebeat.