- Description
- User Story
- Acceptance Criteria
- Demo
- Installation
- Usage
- Languages
- License
- Contributing
- Questions
MongoDB is a popular choice for many social networks due to its speed with large amounts of data and flexibility with unstructured data. This is an API for a social network built using Express.js for routing, a MongoDB database, and the Mongoose ODM. In addition to using the Express and Mongoose packages, it uses the native JavaScript Date
object to format timestamps.
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
GIVEN a social network API
WHEN I enter the command to invoke the application
THEN my server is started and the Mongoose models are synced to the MongoDB database
WHEN I open API GET routes in Insomnia Core for users and thoughts
THEN the data for each of these routes is displayed in a formatted JSON
WHEN I test API POST, PUT, and DELETE routes in Insomnia Core
THEN I am able to successfully create, update, and delete users and thoughts in my database
WHEN I test API POST and DELETE routes in Insomnia Core
THEN I am able to successfully create and delete reactions to thoughts and add and remove friends to a user’s friend list
The following video shows examples of the application's API routes being tested in Insomnia Core.
// Clone the repository to your local machine using:|
git clone git@github.com:malloryfaria/social-network-api.git
// Install all the dependencies by typing code:
npm i
// Ensure you have set up MongoDB
// Connect it to your front end by add the Public folder, html routes, CSS, images, etc.
// Then use the below command to start the server:
npm start
Use this api to set up a social network site.
Express
Node
MongoDB
Mongoose
Javascript
If you would like to contribute, please reach out to us. You can find our contact information in the "Questions?" section below.
If you have any questions about the project, contact us at: https://github.com/orgs/P-I-M/people
This project is licensed under the MIT license.
Copyright (c) 2021
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.