Web Services Development Project
A place where people with an interest in the
fitness industry can share details about their favourite workouts amongst other
users of the forum.
This is a Node.js based restful API which included
significant advanced data persistence. It makes use of messaging i.e. when a user
posts their favourite workout, a message is published to Pub Nub. Users can add
a comment on another user’s workout (perhaps providing them feedback,
increasing the social element of this project). The data is handled through
MongoDB and Mongoose (This is an object modelling tool used to work in an
asynchronous environment).
Unit
testing of the API is achieved using Mocha, Should and SuperTest, with a report
automatically generated by Mochawesome after each test has concluded. The
combination of custom validation and unit testing increases the validity of
posts.
Security/Authentication: 2 users are added to
the forum when the server starts up, upon registering they are given a JSON web
token using JWT and the authentication middleware Passport.js. This token can
then be used to add, delete, update or view workout information. Without the
token, users will simply be given a 403 message! The API was continually tested
within the API development environment, Postman.
This project has also been deployed to Heroku
and the GitHub repository can be seen below.
Here is a link to the GitHub repo
Grade: 78%
Comments
Post a Comment