npm install
npm i netlify-cli -g
When developing if you don't see the Login button on the screen, go into your browser console and execute the following command:
localStorage.setItem("netlifySiteURL", "https://cobresun-movie-club.netlify.app")
... then refresh the page.
Also when developing use the cobresunofficial@gmail.com
account.
netlify init (authorize with Cobresun Netlify account)
netlify dev
npm run build
npm run lint
npm test
npm run test:watch
npm run coverage
To manage database migrations, the following NPM scripts are used:
migrate
: Executes schema migrations for the deployment environment without specifying an .env
file and runs code generation.migrate:dev
: Executes schema migrations in the development environment, requiring the .env
file, and runs code generation.migrate:down
: Reverts the last schema migration in the development environment, requiring the .env
file, and runs code generation.migrate:data
: Handles data migrations in the development environment, requiring the .env
file.codegen
: Generates types and queries based on the current database schema using the Kysely code generator with PostgreSQL dialect.Migration scripts should be placed in the migrations/schema
directory and named following this convention: <dateISO>_<yourchanges>
, e.g., 20240201_AddClubTable
.
npm run migrate
npm run migrate:dev
npm run migrate:down
npm run migrate:data -- <YourDataMigration>
npm run codegen
For development migrations, ensure you have the .env
file set up with the necessary environment variables. The .env
file details can be found in the Cobresun Notion.