|
1 |
| -This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). |
| 1 | +# Dub with Next.js |
| 2 | + |
| 3 | +This example shows how to use Dub with [Next.js](https://nextjs.org/). |
2 | 4 |
|
3 | 5 | ## Getting Started
|
4 | 6 |
|
5 |
| -First, run the development server: |
| 7 | +1. Add your Dub API key and Workspace ID to your `.env` file: |
| 8 | + |
| 9 | +```shell |
| 10 | +cp .env.example .env |
| 11 | +``` |
| 12 | + |
| 13 | +``` |
| 14 | +DUB_API_KEY=p4z... |
| 15 | +DUB_WORKSPACE_ID=ws_clrei... |
| 16 | +``` |
6 | 17 |
|
7 |
| -```bash |
8 |
| -npm run dev |
9 |
| -# or |
10 |
| -yarn dev |
11 |
| -# or |
12 |
| -pnpm dev |
13 |
| -# or |
14 |
| -bun dev |
| 18 | +2. Install dependencies: |
| 19 | + |
| 20 | +```shell |
| 21 | +pnpm install |
15 | 22 | ```
|
16 | 23 |
|
17 |
| -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. |
| 24 | +3. Run the Next.js development server: |
18 | 25 |
|
19 |
| -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. |
| 26 | +```shell |
| 27 | +pnpm run dev |
| 28 | +``` |
20 | 29 |
|
21 |
| -This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. |
| 30 | +## Resources |
22 | 31 |
|
23 |
| -## Learn More |
| 32 | +- [Dub API Reference](https://dub.co/docs/api-reference) |
| 33 | +- [Create API Key](https://app.dub.co/settings/tokens) |
| 34 | +- [Get Workspace ID](https://dub.co/help/article/how-to-get-workspace-id) |
24 | 35 |
|
25 |
| -To learn more about Next.js, take a look at the following resources: |
| 36 | +## Contributing |
26 | 37 |
|
27 |
| -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. |
28 |
| -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. |
| 38 | +Thanks for taking the time to contribute! Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make will benefit everybody and are very appreciated. |
29 | 39 |
|
30 |
| -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! |
| 40 | +Please try to create bug reports that are: |
31 | 41 |
|
32 |
| -## Deploy on Vercel |
| 42 | +- _Reproducible._ Include steps to reproduce the problem. |
| 43 | +- _Specific._ Include as much detail as possible: which version, what environment, etc. |
| 44 | +- _Unique._ Do not duplicate existing opened issues. |
| 45 | +- _Scoped to a Single Bug._ One bug per report. |
33 | 46 |
|
34 |
| -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. |
| 47 | +## License |
35 | 48 |
|
36 |
| -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. |
| 49 | +MIT License |
0 commit comments