Install all dependencies
./bin/installSetup local MySQL:
mysql -uroot os_moderator < packages/backend-core/seed/initial-database.sql
./bin/osmod migrate./bin/osmod ...migrateMigrate the database upmigrate:undoReverse a database migrationusers:createCreate new OS Moderator usersusers:get-tokenGet a JWT token for a user specified by id or emaildenormalizeRe-run denormalize countsexecRun a subcommand with app.yaml environmentcomments:recalculate-text-sizesUsing node-canvas, recalculate comment heights at a given width.comments:calculate-text-sizeUsing node-canvas, calculate a single comment height at a given width.comments:recalculate-top-scoresRecalculate comment top scores.comments:rescoreRescore comment.
Create OS Moderator users via the command line.
Create a human user:
./bin/osmod users:create --group general --name "Name" --email "email@example.com"Create a service user:
./bin/osmod users:create --group service --name "Robot"Get JWT tokens for existing users via the command line:
By user id:
./bin/osmod users:get-token --id 4By email:
./bin/osmod users:get-token --email "email@example.com"Runs local server on :8080 and front-end on :8000
./bin/watchUses Lerna to publish to the different npm packages
./bin/publish./bin/lintoptionally you can run lint-fix to attempt auto-fixing most lint errors
./bin/lint-fixDiffs storyshots of the current code against the last saved.
./bin/storybookTo update stories that need new snapshots, go to packages/frontend-web and run
npm run storybook:test -- -u