MongoDB is a popular choice for many social networks due to its speed with large amounts of data and flexibility with unstructured data. For a practice challenge, I used several of the technologies that social networking platforms use in their full-stack applications. Because the foundation of these applications is data, it’s important that you understand how to build and structure the API first.
My challenge was to build an API for a social network web application where users can share their thoughts, react to friends’ thoughts, and create a friend list. I used Express.js for routing, a MongoDB database, and the Mongoose ODM.
No seed data is provided, so I needed to create my own data using Postman after I created my API.
- nodejs - to run the server in the terminal
- MongoDB - database management
- dotenv - to hide sensitive user data
- mongoose - Database modeling/queries/etc
- Postman - In-app CRUD operations on API requests
- moment - utility for date/time formatting
- Learning MongoDB / Mongoose
- Syncing up controllers and routers
- Best practices for readability
- Front-End implementation
- Emoji-based reactions
AS A social media startup
I WANT an API for my social network that uses a NoSQL database
SO THAT my website can handle large amounts of unstructured data
Here is a video link of the app in action
- For installation onto local machine, clone provided repository.
- Use
npm init
to initalize node package manager - Use
npm install
ornpm i
to install dependencies - For development purposes, use
npm run dev
, found in the scripts to work with nodemon.
MIT © Krenbot