rsnext/examples/api-routes-rest
2020-05-27 17:51:11 -04:00
..
pages Update Examples for Fast Refresh (#13068) 2020-05-18 17:44:18 -04:00
package.json Update api-rest-example to SSG (#11362) 2020-03-28 13:27:17 -05:00
README.md Update references to zeit/next.js (#13463) 2020-05-27 17:51:11 -04:00

API routes with REST

Next.js ships with API routes, which provide an easy solution to build your own API. This example shows how it can be used to create your REST api.

Deploy your own

Deploy the example using Vercel:

Deploy with Vercel

How to use

Using create-next-app

Execute create-next-app with npm or Yarn to bootstrap the example:

npm init next-app --example api-routes-rest api-routes-rest-app
# or
yarn create next-app --example api-routes-rest api-routes-rest-app

Deploy to Now

Deploy it to the cloud with Vercel (Documentation).