/VidBox

Creating a RESTful API for a video rental service with Node.js, Express & MongoDB

Primary LanguageJavaScript

VidBox - a movie rental service app

Learning Node.js by creating a video store app, by the following udemy tutorial: Node.js: The Complete Guide to Build RESTful APIs (2018).

To do

  • Build models and APIs:
    • Genres
    • Customers
    • Restructure Genres & Customers models
    • Movies
    • Rentals
    • Returns
  • Authentication/Authorization
  • Handling and logging errors
    • set up winston
    • add logging
  • Testing
    • Unit testing (genres)
      • user model
      • auth middleware
    • Integration testing
      • auth route
      • genres route
      • returns route
    • End to end testing
  • Deployment

Quick Start

Prerequisites

After complete installation Node and mongodb.

git clone https://github.com/bipro10/VidBox.git
cd VidBox
npm install
npm start

APIs

Auth endpoints

User endpoints

  • GET
    • /api/genres
    • /api/genres/:id
  • POST
    • /api/genres
  • PUT
    • /api/genres/:id
  • DELETE
    • /api/genres/:id

Features:

  • route handling using express
  • NoSQL database using mongodb
  • request validation using joi
  • database and file logging using winston
  • authentication and authorization using jwt and bcrypt
  • unit and integration tests using jest and supertest

Useful links: