A minimal todo app, powered by svelte
.
after cloning the project run pnpm i
(or npm install
or yarn
), start a development server:
pnpm dev
To run the database
locally on your comuter
pnpm db:start
I'm using Drizzle ORM to generate and push database migrations (both local & production)
run below command to generate
migrations
pnpm db:generate
run below command to push
the migrations
pnpm db:push
or instead of running separately run below command to do both (generate
and push
)
pnpm db:migrate
After 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 build
This 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