Skip to content

Next.js API that connects to a Mongodb collection of geojson map features using SWR and Axios

License

Notifications You must be signed in to change notification settings

jthomassie/next-mongodb-swr-api

Repository files navigation

next-mongodb-swr-api

License: MIT

next.js, mongodb, swr, axios, bootstrap, mapbox-gl, turf

  • Set up a Next.js API that connects to a Mongodb collection of geojson map features using SWR and Axios.
  • Filter the geojson features with queries and aggregations to create layers on a Mapbox map.
  • Use the interactive map and Bootstrap forms to filter, create, update, or delete features in the database.
  • Note: this is a work-in-progress...

Get Started

Import the modules:

npm install
# or
yarn install

Run the development server:

npm run dev
# or
yarn dev

View in your browser:

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, Mongodb, and Next's API features, take a look at the following resources:

Deploy on Vercel

About

Next.js API that connects to a Mongodb collection of geojson map features using SWR and Axios

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published