CYF Project - Learning Platform
- Go to
top level
folder, and runnpm install
- Go to
top level
folder, and runnpm start
- Go to
top level
folder, and runnpm run lint
- In order to fix errors, run
npm run fix-lint
- In order to fix errors, run
Our workflow is a variation of Gitflow
-
Pick an issue from Github (assign it to yourself and make sure there is enough description)
-
Locally, switch to
master
, thengit pull upstream master
. NOTE: If you get a merge message, that means you made a mistake and you worked onmaster
by accident. Clean your master (i.e.git reset --hard previous_commit
- ask a mentor to help) -
Create a branch based on the story
git checkout -b feature-title
.
If you're working on a feature for adding a student, then name the branch add-student
for example.
-
Work on the branch (add, commit and push)
-
Create a Pull Request when you are finished.
-
Repeat.
The first time you create the database, you will need to run these commands (three of them separately) in postgres
DROP ROLE IF EXISTS cyf;
CREATE USER cyf WITH PASSWORD 'password';
CREATE DATABASE orula OWNER cyf;
We use knex
for migrations, but we created alias helpers on package.json
to make it easier to run the commands.
- Create a migration
npm run create-migration table_name
- Create a seed
npm run create-seed table_name
From psql:
/c postgres
CREATE DATABASE orula OWNER cyf;
if it complains that there are active connections then run:
SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity WHERE pg_stat_activity.datname = 'orula'