devloop01 / todoit

a simple todo app powered by svelte

Home Page:https://dub.sh/todoit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

todoit

A minimal todo app, powered by svelte.

Run Locally

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

Generating & Pushing migrations

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

Setup with Vercel

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

About

a simple todo app powered by svelte

https://dub.sh/todoit


Languages

Language:Svelte 51.9%Language:TypeScript 44.2%Language:CSS 2.0%Language:JavaScript 1.3%Language:HTML 0.6%