Collaboration management tool for team projects.
Setup local Postgres database instance
sudo -su postgres
psql
create user <username> with password '<password>';
create database <database name> owner <username>;
grant all privileges on database <database name> to <username>;
Create .env file and fill in the details.
cp .env.samle .env
Create virtual environment and install dependencies
pipenv shell
pipenv install
Run the devlopment server
python3 manage.py runserver
Change the directory to frontend folder, install dependencies and start app.
cd frontend/
npm i && npm start
- Make sure you have a local db instance created during setting up local development, make sure your user has the permissions to create databases.
sudo -su postgres
psql
ALTER USER <username> CREATEDB;
\q
exit
- Creating a test db and running tests.
python manage.py test
- Install dependencies and run tests
cd frontend
npm i && npm test
Frontend is served as a django app and for some reason I couldn't find apt deployment so this is a workaround for deploying a coupled django and react app on heroku. It's adviced to make a copy of the project while deploying, quite inconvenient I know but you won't end up messing the working project structure.
- Add NodeJS as a heroku buildpack
heroku buildpacks:add --index 1 heroku/nodejs
- Move the contents of the frontend app to the project root
mv frontend/* ./
- Should be good now
git add .
git commit -m "..."
git push heroku master