- Install Redis
- Copy the
.env.examplefile to.envand update the values as needed.
# this will setup all the tables & seed some data
npm run migrate:upbrew install nvm
nvm usenpm install
npm start
- To create a new migration file, run the following command:
npm run migrate:create <migration-name> - Then you will see three files created in migrations folder. You need to update the
upanddownsqls in the*****-up.sqland*****-down.sqlfiles respectively. No need to change/update thejsfile. - After that, you can run the migration using
npm run migratecommand. - In case you want to revert the last migration, you can run
npm run migrate:down1command.