This is a Next.js project bootstrapped with create-next-app
.
https://bing-search-example-app.netlify.app/
You can see the site deployed in netlify here:Getting Started
First, install the dependencies:
npm i
# or
yarn
Next, you need to obtain a Bing Search API key. Once you have the key, create a .env.local
file with the .env.example
file content and paste it.
After that, run the development server:
npm run dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result.
API routes can be accessed on http://localhost:3000/api/search. This endpoint can be edited in pages/api/search.ts
.
The pages/api
directory is mapped to /api/*
. Files in this directory are treated as API routes instead of React pages.
Learn More
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!