An open API service indexing awesome lists of open source software.

https://github.com/motdotla/hello-edge


https://github.com/motdotla/hello-edge

Last synced: 5 months ago
JSON representation

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):

[![Deploy with Vercel](https://vercel.com/button)](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)).