Code Monkey home page Code Monkey logo

black-nijar / nodejs-bootcamps Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 1.72 MB

NodeJS, ExpressJS and MongoDB-Working on 26 API endpoints along with a database that stores information about courses offered in various countries and regions. Basic API endpoints in this project include authentication (Registration and User login), Image upload, and query based endpoints. Other endpoints are different from the basic ones

JavaScript 100.00%
nodejs mongodb expressjs express-fileupload morgan pagination

nodejs-bootcamps's Introduction

NodeJS---APIs-

Working on 26 API endpoints along with a database that stores information about courses offered in various countries and regions. Basic API endpoints in this project include authentication (Registration and User login), Image upload, and query based endpoints. Other endpoints are different from the basic ones

Run this code locally on port 5000 to test the following api endpoints: http://localhost:5000

Authentication:

  1. Register a User (/api/v1/auth/register)
  2. Login a User (/api/v1/auth/login)
  3. Get Logged User using cookies and token (/api/v1/auth/me)
  4. Forgot Password (/api/v1/auth/forgotpassword) (Using node-mailer)
  5. Reset Password (/api/v1/auth/resetpassword/:id) (Reset password by user) (id = reset password token from the email)
  6. Update user details (/api/v1/auth/updatedetails) (Admin access)
  7. Update Password (/api/v1/auth/updatepassword)
  8. Logout User (/api/v1/auth/logout)

Bootcamps:

  1. Get all bootcamps (/api/v1/bootcamps) (Also includes queries, pagination, sorting and filtering)
  2. Get single bootcamp by ID (/api/v1/bootcamps/:id)
  3. Create a new bootcamp (/api/v1/bootcamps) (Only users with access to create a bootcamp will be able to access this route)
  4. Update Bootcamp (/api/v1/bootcamps/:id) (Update bootcamp by ID)
  5. Delete Bootcamp (/api/v1/bootcamps/:id) (Delete bootcamps by ID)
  6. Get Bootcamps by Distance (/api/v1/bootcamps/radius/:zipcode/:radius) (Filter bootcamps based on zipcode and radius) (Using GeoJSON points, mapquest)
  7. Upload photo for bootcamps (/api/v1/bootcamps/:id) (Upload photo to a particular bootcamp based on bootcamp ID)

Course:

  1. Get all courses (/api/v1/courses) (Also includes queries, pagination, sorting and filtering)
  2. Get courses for a particular bootcamp (/api/v1/bootcamps/:bootcampId)
  3. Get a single course based on ID (/api/v1/courses/:id)
  4. Create course (/api/v1/bootcamps/:id/courses) (Create courses under a bootcamp. Courses can only be created if a related bootcamp exists)
  5. Update course (/api/v1/course/:id) (Update courses by course ID. Route only available to the user who created the course. Role: Publisher)
  6. Delete course (/api/v1/course/:id) (Delete course by course ID. Route available to both admin and user with role: Publisher)

Admin Controls (Routes available for access only to the admin):

  1. Get all users (/api/v1/users)
  2. Get single user (/api/v1/users/:id) (Get users based on user id)
  3. Create User (/api/v1/users)
  4. Update User (/api/v1/users/:id)
  5. Delete User (/api/v1/users/:id) (Delete user by ID)

nodejs-bootcamps's People

Contributors

black-nijar avatar

Stargazers

 avatar

Watchers

 avatar  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.