This project is a monorepo.
All scripts can be run from the root.
yarn dev
from the root will run frontend + backend with hot reload.
yarn db:init
: Creates the database and runs first migration to pull in new models (will be initally empty)
yarn db:seed
: Populates the tables with seed data
yarn db:migrate
: Runs another migration in case you add another table
yarn knex migrate:make __migration-name__
: creates new migration template ts file
yarn knex seed:make __seed-name__
: creates new template seed ts file
- Node
- Yarn (can be installed using
npm install -g yarn
)
We have cors within the backend disabled right now, but we need to enable it when deploying. It could be a secure risk.
const corsOptions ={
origin:'http://localhost:4000',
credentials:true, //access-control-allow-credentials:true
optionSuccessStatus:200
}