BizzBuzz API, a makeshift social media application that allows user to create long post messages.
BizzBuzz API Documentation on Postman
- Clone the project in your local computer
- Enter
npm install
oryarn start
to install all dependencies - Terminal/CLI command:
npm run setup:env
to create .env file based on the .env.example file. This command creates the file along with error message in Windows, Linux or MacOS printed command prompt, bash or terminal. This is fine it is due to the command used, one tries for Windows if fails it try for Linux/Mac. - You to ensure you have all listed environment variables. Check config.js to see the required node.js server
- Run
npm run dev
on your terminal or command line interface to run the server in developement mode. - Start the server with
npm start
Express.js for api server
mongoose - Mongodb ORM for crud operations
jsonwebtoken to create authorization tokens
bcrypt for hashing passwords and tokens
SendGrid Mail for sending emails
dotenv for parsing envvironment variables
Cloudinary Node.js SDK
Nodeemon monitoring script of node.js development
- POST
/auth/register
to register a new user - POST
/auth/login
logins a new user - POST
/auth/change-password
changes user password* - POST
/auth/reset-password
request a password resets* - POST
/auth/confirm-reset?token={{token}}&id={{id}}
resets to new password*
- GET
/posts
gets all post - POST
/posts
adds a new post* - GET
/posts/{postId}
gets a post* - PUT
/posts/{postId}
updates a post* ** - DELETE
/posts/{postId}
deletes a post* **
- GET
/posts/{postId}/like
add or remove like* ** - GET
/posts/{postId}/likes
gets all likes on a post*
- GET
/posts/{postId}/replies
gets all post replies* - POST
/posts/{postId}/replies
adds a reply to a post* - GET
/posts/{postId}/replies/{replyId}
gets a post reply* - PUT
/posts/{postId}/replies/{replyId}
edits a reply on a post* ** - DELETE
/posts/{postId}/replies/{replyId}
deletes a reply on a post* **
*
requires jwt token on Authorization header of request
**
requires that user is the author of post/like/reply
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
Please note we have a code of conduct, please follow it in all your interactions with the project.
- Ensure any install or build dependencies are removed before the end of the layer when doing a build.
- Update the README.md with details of changes to the interface, this includes new environment variables, exposed ports, useful file locations and container parameters.
- Make all pull requests of new features to the develop branch so it can be project