Skip to content

gangsthub/nuxt-edge-test

Repository files navigation

Nuxt in the edge

This Nuxt app was used as a demo at the Vue.js Roadtrip Barcelona 2022 conference.

Setup

Make sure to install the dependencies:

# npm
npm install

Development Server

Start the development server on https://localhost:3000

npm run dev

Production

Build the application for production:

npm run build
# until Nuxt+Nitro gets more stable, you might need to set manually NITRO_PRESET to your target preset

Locally preview production build:

# If you're targeting Cloudflare Workers:
NITRO_PRESET=cloudflare npm run build && npm run miniflare
# If you're targeting Vercel:
npm i -g vercel
NITRO_PRESET=vercel-edge yarn build && vercel

Deploy to Clouflare Workers:

NITRO_PRESET=cloudflare npm run build && npm run publish

Deploy to Vercel:

# if you haven't installed vercel CLI yet, do so:
npm i -g vercel
# and then:
NITRO_PRESET=vercel-edge yarn build && vercel

Checkout the deployment documentation for more information.