This is a Next.js project bootstrapped with create-next-app
.
First, install the dependencies:
yarn
Secondly, run the development server:
npm run dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result.
We are using Next.js API routes in order to create a Node.js server for getting the data.
The endpoint which returns the data (in JSON format) lives under http://localhost:3000/api/trips. This endpoint is called client-side in our components via axios
.