A simple and efficient full-stack URL shortener built with Nuxt, TypeScript, and Cloudflare Pages, seamlessly integrating with Cloudflare D1 Database.
First, set up your .env
file by copying the example:
cd cf-examples-nuxt
cp .env.example .env
Then, run the development server:
Recommended versions:
- node ^20.16.0
- pnpm ^9.7.1
pnpm install
pnpm run db:generate
pnpm run db:up
pnpm run db:migrate
pnpm run dev
# dev cf preview
pnpm run dev
Open http://localhost:3000 with your browser to see the result.
REST API URL:
- api:
/server