codingforentrepreneurs / serverless-nodejs-api-nextjs

Example Next.js app that will consume our Serverless Node.js API from https://github.com/codingforentrepreneurs/serverless-nodejs-api

Home Page:https://serverless-nodejs-api-nextjs.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example App Using the Serverless Node.js Api

This is a Next.js application designed to:

  • Be Deployed on Vercel.com
  • Use a pre-existing backend/API instead of Next.js's API (although you can use both)

The API we will use is what we created in the Serverless Node.js API course repo. The Serverless Node.js API is deployed on AWS Lambda via the Serverless framework and Neon's Serverless Postgres Database service.

To creat this app, we just ran:

Create Next App Screenshot

Then we added:

  • vercel.json

With the contents:

{
    "rewrites": [
        { 
            "source": "/api/leads",
            "destination": "https://my-api-example.com/api/leads"
        }
    ]
}

About

Example Next.js app that will consume our Serverless Node.js API from https://github.com/codingforentrepreneurs/serverless-nodejs-api

https://serverless-nodejs-api-nextjs.vercel.app


Languages

Language:JavaScript 73.8%Language:CSS 26.2%