This project showcases how to create a simple API, used for tracking plants in your garden, with Next.js. The API uses the new Route Handlers available in Next.js 13 and MongoDB for storage.
This sample project is used for a forthcoming post on the ngrok blog: Build an API in Next.js and deploy with Kubernetes, Rancher, and ngrok.
This repository also contains deployment files—notably the Dockerfile
and deployment.yaml
Kubernetes manifest—to containerize the API and deploy it to a Rancher-managed Kubernetes cluster, with ngrok's open source Kubernetes ingress controller handling public traffic, load balancing, authentication, observability, and more. Find more details on that process in the associated blog post.
If you have any questions about this sample code, the blog post, or ngrok itself, please reach out by creating an issue. You can also reach the ngrok team on X (aka Twitter) @ngrokhq or LinkedIn, or joining the community on Slack.