You can check it out at https://auto-amigo-mongo.vercel.app/
This is a mini version of my project Auto Amigo. I made it to refresh my memory on MongoDB and Mongoose and to try out some tech I haven't used before.
This is a Next.js project bootstrapped with create-next-app
. I referenced the MongoDB with Mongoose example, but I am using TypeScript and leveraging SWR more.
This project is using Next 13, but to get started quicker, it uses the pages API (instead of the new app router).
- React, Next.js, Vercel
- MongoDB, Mongoose, Mongo Atlas
- TypeScript
- SWR
- Axios
- Ant Design
- Get a copy of the repo locally
git clone https://github.com/Zhusufeng/auto-amigo-mongo.git
- Install the dependencies
npm i
- Get MongoDB up and running.
- If you don't have a MongoDB and have Docker, you get an instance running using the following command:
docker run -d -p 27017:27017 --name my-mongo-db mongo
- Create a database in your MongoDB. I used the GUI, MongoDB Compass, and named mine "auto-amigo-mongo".
- Create a copy of the file
env.local.example
and rename itenv.local
. Fill out the environment variables, including your MongoDB connection string. - Run the development server.
npm run dev
- Go to your browser to view it at http://localhost:3000/