A minimal todo app, powered by svelte.
after cloning the project run pnpm i (or npm install or yarn), start a development server:
pnpm devTo run the database locally on your comuter
pnpm db:startI'm using Drizzle ORM to generate and push database migrations (both local & production)
run below command to generate migrations
pnpm db:generaterun below command to push the migrations
pnpm db:pushor instead of running separately run below command to do both (generate and push)
pnpm db:migrateAfter importing the project from github in vercel add your environment variables
In the Build and Output Settings toggle override and set the build command to
pnpm db:migrate && vite buildThis will create the migrations and push them to the connected local or production database
It's better to generate migrations and test locally before pushing the migrations.
PS: sometimes vercel tries to use the generated cache and that results in build error you can disable new builds to use cache using VERCEL_FORCE_NO_BUILD_CACHE, and setting this value to 1