Giter VIP home page Giter VIP logo

movies-cart-api-server's Introduction

Backend code for the movies app that includes node js, express, jwt, bcrypt, and other features.

Backend built with Node.js/Express and MongoDB, with pre-defined authentication, email verification, and account deletion.

ready to use

this server is deployed on heroku https://movies-api-server11.herokuapp.com/

Features

  • Mongodb (local and cloud)
  • Email Verification
  • user details and password stored into environment variables
  • Password reset and delete account
  • Manage user Authentication using Json Web Token
  • CRUD operations for the movies api
  • CRUD operations for the genres api

access api routes

  • GET /api/genres result ex: [{ name: "action", desc: "full of action"}, {name:"comedy", dec: "xyzz.."}]
  • POST /api/genres add genres to database ex: {name: "drama", desc: "drama stuff"}
  • GET/ POST /api/movies movies added to database ex: {"title": "name of movie", "genreId": "genre id", "numberInStock": 12, "dailyRentalRate" : 1.2}
  • PUT /api/movies/"type movie id" update movie to database ex: {"title": "name of movie", "genreId": "genre id", "numberInStock": 12, "dailyRentalRate" : 1.2}
  • DELETE /api/movies/"movie id" delete a movie from the database
  • POST /api/users add a user account to login ex: {name: "sarb", email: "[email protected]", password: "123dhjshk"}
  • POST /api/login login to account ex: {email:"[email protected]", password: "ahdjkhkjadh"}
  • A jwt token will be sent in the header if the user successfully logs in.

Set-Up

Steps to set up development environment variables

  1. install config npm i config
  2. create config folder with "default.json" and "custom-environment-variables.json" files
  3. defined required enviroment variables in "default.json" and "custom-enviroment-variables files"
  4. set custom environment variables on local machine server by typing ex: $ export variablename="variablevalue"
  5. For example if user want to set remote_db, just go to command prompt type : export remote_db="remote db address type here"
  6. set custom environment variables on remote server(heroku) by typing ex: $ heroku config:set variablename="variablevalue"
  7. display saved custom variables on remote server by typing ex: $ heroku config
  8. display saved custom variables on local server by typing ex: $ export

movies-cart-api-server's People

Contributors

sarbbjeet avatar

Stargazers

Dima Grossman avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.