Nuxt 3 + Medium (n3dium)
This is a tiny, incomplete example for a paywalled content site built in Nuxt 3 for a live-coding session at Vue.js Global Summit 2022.
Features
- Based on Nuxt 3
- Nuxt Content v2
- Server API routes using Nuxt Nitro
- JWT authentication using jose
- Light & dark mode using pico.css
Try it out
Setup
# install dependencies
pnpm install # or yarn
# set up keys (used for JWT signing/verification)
openssl ecparam -genkey -name prime256v1 -noout -out key-pair.pem
openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in key-pair.pem -out private.key
openssl ec -in key-pair.pem -pubout -out public.key
# serve in dev mode, with hot reload at localhost:3000
pnpm dev
# build for production (universal)
pnpm build
# preview in production mode
pnpm start
Deployment
You should be able to deploy this repository with zero or minimal configuration.
- Azure
- Cloudflare Workers
- Firebase Hosting
- Netlify
- Vercel
- ... and more
License
MIT