Twittle is an API aimed for use in social networking applications, allowing developers to store and retrieve data typical of social media networks including user data, posts, reactions, and friends lists. The API utilizes a MongoDB database and the Mongoose ODM, as well as the Express.js package for routing.
Clone the repository:
git clone git@github.com:t-starkw/twittle.git
Install the required dependencies:
npm install
Run the project in your local browser:
npm start
Use your browser or an app like Insomnia to test the REST API.
User
- Get all users:
GET /api/users
- Create a user:
POST /api/users
- Get user by ID: `GET /api/users/:userId'
- Update a user: `PUT /api/users/:userId'
- Delete a user: `DELETE /api/users/:userId'
- Add a friend:
PUT /api/users/:userId/friends/:friendId
- Delete a friend:
DELETE /api/users/:userId/friends/:friendId
Thought
- Get all thoughts:
GET /api/thoughts
- Create a thought:
POST /api/thoughts
- Get thought by ID: `GET /api/thoughts/:thoughtId'
- Update a thought: `PUT /api/thoughts/:thoughtId'
- Delete a thought: `DELETE /api/thoughts/:thoughtId'
Reaction
- Add a reaction:
PUT /api/thoughts/:id/reactions
- Delete a reaction:
DELETE /api/thoughts/:id/reactions
Tessa Starkweather – LinkedIn – tess.starkweather@gmail.com
View my profile – GitHub
Distributed under the MIT license. See LICENSE
for more information.
- Fork it (https://github.com/t-starkw/twittle/fork)
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request