This is a back end application for a Social Network created using a configured working Express API & mongoose ODM to interact with a mongoDB database. MongoDB is a popular choice for many social networks due to its speed with larger amounts of data and flexibility with unstructured data. Due to their prevalence, the aim of this application is to demonstrate my understanding of how to build and structure the API of these networks.
- JavaScript
- node.js
- Express.js
- MongoDB
- Mongoose
- Mongoose validator
- Moment.js
-
Git clone this repository onto your local machine and navigate to the file on your terminal. This can also be done by opening the file on Visual Studios and running it through the intergated terminal.
-
In order for the app to function correctly, ensure you have the latest or most stable version of Node.js.
-
Run
npm install
to download. -
To start the application, run:
npm run start
This application allows you to navigate different link routes that display data from the database.
-
GET/ POST routes:
http://localhost:3001/api/users
http://localhost:3001/api/thoughts
- If you wish to GET a certain id you can do so by adding an
/id
at the end of the link.
- If you wish to GET a certain id you can do so by adding an
-
PUT/DELETE routes:
http://localhost:3001/api/users/:id
http://localhost:3001/api/thoughts/:id
-
POST/ DELETE routes:
http://localhost:3001/api/users/:id/friends/:friendId
http://localhost:3001/api/thoughts/:id/reactions
- The route above is used to POST a new reaction. If you wish to DELETE a certain reaction you can do so by adding an
/id
at the end of the link.
- The route above is used to POST a new reaction. If you wish to DELETE a certain reaction you can do so by adding an
MIT License Copyright (c) [2022] [ettaho] Permission is herby 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 limiation 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 following coditions: 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 MECHANTABILITY, 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 OF OTHER DEALINGS IN THE SOFTWARE.
If you have any questions, contact me via email. You can also find more of my work here.