https://github.com/motdotla/hello-edge
https://github.com/motdotla/hello-edge
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/motdotla/hello-edge
- Owner: motdotla
- Created: 2023-05-22T22:52:51.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-22T23:30:57.000Z (over 2 years ago)
- Last Synced: 2025-01-24T05:09:14.512Z (12 months ago)
- Language: CSS
- Homepage: https://hello-edge-five.vercel.app
- Size: 104 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
---
name: Next.js Hello World Edge API Routes
slug: edge-hello-world-nextjs
description: A classic Hello World for the edge featuring Next.js.
framework: Next.js
useCase: Edge Functions
css: CSS Modules
deployUrl: https://vercel.com/new/clone?repository-url=https://github.com/vercel/examples/tree/main/functions/hello-world-next&project-name=edge-hello-world-nextjs&repository-name=edge-hello-world-nextjs
demoUrl: https://next-edge-api-route.vercel.app/api/edge
- edge-hello-world
- edge-query-parameters
- edge-json-response
---
# Next.js Hello World Edge API Routes
A classic Hello World for the edge featuring Next.js.
## Demo
https://next-edge-api-route.vercel.app/api/location
## How to Use
You can choose from one of the following two methods to use this repository:
### One-Click Deploy
Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=vercel-examples):
[](https://vercel.com/new/git/external?repository-url=https://github.com/vercel/examples/tree/main/edge-functions/hello-world-next&project-name=edge-hello-world-nextjs&repository-name=edge-hello-world-nextjs)
### Clone and Deploy
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [pnpm](https://pnpm.io/installation) to bootstrap the example:
```bash
pnpm create next-app --example https://github.com/vercel/examples/tree/main/edge-functions/hello-world-next edge-hello-world-nextjs
```
Next, run Next.js in development mode:
```bash
pnpm dev
```
Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=edge-middleware-eap) ([Documentation](https://nextjs.org/docs/deployment)).