SERIAL SOCIAL
is an API for a social network web application where true crime fanatics can share their thoughts, react to friends' thoughts, and create a killer friend list. The app uses Express.js for routing, a MongoDB database, Mongoose as the ORM, and the Moment.js npm package for timestamp formatting.
The application is invoked using the following commands:
git clone https://github.com/christiecamp/serial-social.git
Ensure that you have installed MongoDB & MongoDB Compass onto your computer, and that the connection is live
npm i express dotenv mongoose moment
INSTRUCTIONS:
-
Open the Integrated Terminal and follow the installation guidelines
-
Interact with
SERIAL SOCIAL's
back end with Insomnia or MongoDB Compass by testing the below:- GET all users & thoughts
- GET user & thought by id
- CREATE user, thought, reaction
- UPDATE user, thought, friend, & reaction
- DELETE user, thought, friend, & reaction
view demo videos and testing for further help
TESTING WITH INSOMNIA or MONGODB COMPASS:
There are different tools available that can test reading/writing operations in a web browser - in this application we use Insomnia, a REST client that makes it easy to send HTTP requests to an API and view response details, and MongoDB Compass the GUI for MongoDB.
-
After installing Insomnia, open a new document.
-
Interact with
SERIAL SOCIAL's
back end by testing the below commands:
http://localhost:3013/api/users/
http://localhost:3013/api/thoughts/
http://localhost:3013/api/thoughts/659d7eac47d1a55210e92aca
http://localhost:3013/api/thoughts/659d93d6da28d9bb5489eb0d/reactions
{
"reactionBody": " ",
"username": " "
}
http://localhost:3013/api/users/659d8a1ce2019aeeb57c5156
{
"username": " ",
"email": " "
}
http://localhost:3013/api/users/userId/friends/friendId
Here's a list of technologies used:
-
Node.js - an open-source, cross-platform JavaScript runtime environment.
-
Express.js - a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications.
-
MongoDB - a NoSQL database product that utilizes JSON-like documents with optional schemas.
-
Mongoose - a Node.js-based Object Data Modeling (ODM) library for MongoDB. It is akin to an Object Relational Mapper (ORM) such as Sequelize for MySQL relational databases.
-
Moment.js - JavaScript library that helps parse, validate, and manipulate date objects
-
Dotenv - a zero-dependency module that loads environment variables from a .env file into
process.env
. -
Insomnia - an open source desktop application that assists in designing, debugging, and testing APIs (specifically in this instance, HTTP-based RESTful APIs).
-
MongoDB Compass - MongoDB's
GUI tool
for querying, optimizing, and analyzing data.