Ensure you have one of the following programs installed on your machine:
Ensure you have these values populated in your .env file:
# app config - see https://nitro.build/config and https://vite.dev/config/
APP_PORT=
APP_HOST=
NITRO_PORT=
VITE_APP_PORT=
VITE_BASE_URL=
VITE_NITRO_PRESET=
VITE_COOKIE_EXPIRY_DATE=
# database credentials - see https://hub.docker.com/_/postgres#environment-variables
DATABASE_URL=
DATABASE_NAME=
DATABASE_USER=
DATABASE_PORT=
DATABASE_HOST=
DATABASE_SCHEMA=
DATABASE_PASSWORD=
# auth config - see https://www.better-auth.com/docs/installation
BETTER_AUTH_URL=
BETTER_AUTH_SECRET=
BETTER_AUTH_JWT_SECRET=
# discord oauth - see https://www.better-auth.com/docs/authentication/discord
DISCORD_CLIENT_ID=
DISCORD_CLIENT_SECRET=
# google oauth - see https://www.better-auth.com/docs/authentication/google
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
# github oauth - see https://www.better-auth.com/docs/authentication/github
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=Ensure you have a postgres database instance running to ensure migrations are ran.
If you have docker installed, you can spin up a database with the following command:
docker compose -f docker-compose.yaml up --build -dTo get up and running with this template you can run one of the following commands:
Unix Commands:
If you are using npm:
npm install && npx drizzle-kit migrate && npm run devIf you are using pnpm:
pnpm install && pnpm exec drizzle-kit migrate && pnpm devIf you are using deno:
deno install && deno run -A npm:drizzle-kit migrate && deno task devIf you are using bun:
bun install && bunx drizzle-kit migrate && bun run devIf you are using docker:
docker compose -f docker-compose.yaml up --build -dNote For Docker: You will still have to
installdependencies and rundrizzle-kit migratewith your package manager after.
PowerShell Commands:
If you are using npm:
npm install; if ($?) { npx drizzle-kit migrate }; if ($?) { npm run dev }If you are using pnpm:
pnpm install; if ($?) { pnpm exec drizzle-kit migrate }; if ($?) { pnpm dev }If you are using deno:
deno install; if ($?) { deno run -A npm:drizzle-kit migrate }; if ($?) { deno task dev }If you are using bun:
bun install; if ($?) { bunx drizzle-kit migrate }; if ($?) { bun run dev }If you are using docker:
docker compose -f docker-compose.yaml up --build -dNote For Docker: You will still have to
installdependencies and rundrizzle-kit migratewith your package manager after.