This project is an API for social network web applications. This API allows users to share their thoughts, react to friends’ thoughts, and create a friend list.
Purely utilizing back-end programming, Express.js is used for routing, MongoDB as a NoSQL database, and Mongoose package for Object Data Modeling (ODM) and to create a connection between MongoDB and the Node.js Javascipt.
Seed data has been created for the sake of demonstrating functionality when testing the API in Insomnia.
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
In order to run the application, ensure that firstly you have Node.js installed and have an account with MongoDB. Then, while in the root of your file structure, run npm init -y
in your Command Line Interface (CLI) to initialize your local directory. Then run npm i
to install all relavent node package dependancies. Lastly, entering npm run start
to the CLI should run the application. In a seperate terminal (again at your root), run mongod
concurrently to run the server. The launched API can be viewed by either entering http://localhost:3001/
in your browser or Insomnia, followed by the relevant API route.
To use this API, you need a front-end.
First, fork this GitHub repository containing the back-end code. From there, you will need to perform a git clone operation on the forked repository to bring it to your local machine.
This code should be placed at the root of your Social Network project file structure, while you work on front-end code contained in a views
and public
folder at the same level.
In your front-end code, you will need to make API calls to fetch data stored in the database, and use functions to pass the retrieved information through to the Document Object Model (DOM). Additionally, you will need to be able to pass user-input from the user interface of the Social Network back through into the database.
You will also need to include a .env
file with your MongoDB database password, as well as a .gitignore
file excluding the following:
node_modules
.DS_store
.env
Walkthrough - Application Demo
Thank you for checking out my project! If you would like to see more of my work, please take a peek at my GitHub and portfolio.
This project is licensed under the MIT License
Please click on the green MIT License Shield above to learn more about what the limitations of this license are.