The purpose, the motivation, the execution:
This application was created as the start of a full stack social network application using a MongoDB database, and Express.js router and the Mongoose ODM. This application sets up the initial CRUD API routes that allow users to be created, searched for, updated, and deleted. This application also allows users to react to a friend's thoughts, create a list of friends, as well as delete thoughts, reactions, or friends. The user can also remove their account. This ground level application provides a strong foundation for the further development to its full potential.
-
Steps required to install project and how to get the development environment running:
-
Clone the repo: git clone https://github.com/dpprdgls/Social-Network-API.git
-
Open in VS Code. If you do not have VS code you must install it.
-
Using the terminal, install node.js v16. If you have homebrew, the command should look like the following (brew install node@16), however this may vary and the documentation should be consulted.
-
Once node.js v16 is installed, in the terminal, utilize the command npm init -y to initialize and create a package.json where project files will be stored.
-
Next, use the terminal to run the command npm i to install the dependencies associated with this application (developers may need to install dependencies directly from the command line).
Commands to install each dependency:
- Command for express will be npm i [email protected]
- Command for mongoose will be npm i mongoose
- Command for nodemon will be npm i nodemon
- Command for jest will be npm i jest
-
Next, you will want to make sure you have access to a MongoDB account and MongoDB Compass, these will allow you to interact with the database and visually confirm what changes are being made in the database. (Link for MongoDB & MongoDB Compass download -> https://coding-boot-camp.github.io/full-stack/mongodb/how-to-install-mongodb).
-
Once all dependencies are installed, you will then be able to run the command npm start from the root directory to spin up the server. With nodemon installed, you will also be able to utilize the command npm run dev to keep the server spun up between code edits.
-
From there, you can utilize applications such as Insomnia to test the functionality of the API routes within the program and make edits to the code base (Link to install Insomnia -> https://docs.insomnia.rest/insomnia/install).
Instructions and examples for use:
The usage of the application is dependent on running the application in your local environment and using an application like Insomnia or Postman to send requests to the various API end points.
A demonstration of video can be found here: Demonstration
Instructions on how other developers can contribute to your project:
Open to collabortation, open an issue and create any changes you would like to incorporate into the project and await approval before merging into the main branch.
Instructions on how to run tests:
There are currently no tests for for this applicaiton.
This project is covered under the MIT License license.
-
For any questions or concerns, feel free to contact me using the information below:
GitHub: @dpprdgls