Skip to content

Commit

Permalink
fix: Instructions (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
bukinoshita authored Mar 5, 2024
1 parent e549659 commit df6d3d9
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 544 deletions.
16 changes: 16 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export const metadata = {
title: 'Next.js',
description: 'Generated by Next.js',
}

export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<html lang="en">
<body>{children}</body>
</html>
)
}
3 changes: 3 additions & 0 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function Page() {
return <h1>Hello, Home page!</h1>
}
22 changes: 16 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,39 @@

This example shows how to use Resend with [Next.js](https://nextjs.org).

## Deploy your own

Deploy the example using [Vercel](https://vercel.com):

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/resend/resend-nextjs-app-router-example&project-name=resend-nextjs-app-router-example&repository-name=resend-nextjs-app-router-example&env=RESEND_API_KEY)

## Instructions

1. Define environment variables in `.env` file.

```sh
cp .env.example .env
```

2. Install dependencies:

```sh
```sh
npm install
# or
yarn
```
```

3. Run Next.js locally:

```sh
```sh
npm run dev
```
```

4. Make a curl request

```
```sh
curl -X POST http://localhost:3000/api/send
```
```

## License

Expand Down
Loading

0 comments on commit df6d3d9

Please sign in to comment.