6804039e94
* npx create → npm init * Fix inconsistent instructions * Update amp-first * Update with-graphql-react * with-firebase-cloud-messaging * Update with-higher-order-component * change create-next-app url * Update create-next-app instruction * Update instructions to use npm instead of npx * Move "the idea behind the example" to top * Rename * Rename * Update contributing.md with a README template |
||
---|---|---|
.. | ||
pages | ||
package.json | ||
README.md |
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 ZEIT Now:
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 now (download):
now