GithubHelp home page GithubHelp logo

rubel011 / mysql-nodejs-backend Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 133 KB

This is Mysql Node.js backend project, where you can register, log in, and access restricted resources. AWS-deployed-Link:-

Home Page: https://quadb-nodejs-qxb9.onrender.com/

JavaScript 100.00%
aws-ec2 bcrypt expressjs jsonwebtoken nodemailer planetscale nodejs mysql sequelize sequelize-cli

mysql-nodejs-backend's Introduction

QuadB Tech Node.js Backend Project

This is the QuadB Tech Node.js backend project, where you can register, log in, and access restricted resources.

API Documentation: for Swagger

You can explore the API documentation using Swagger UI. Access the documentation by navigating to:

https://quadb-nodejs-qxb9.onrender.com/api-docs

Functionality

The API includes the following functionality:

  • User Registration
  • User Login and Authentication
  • User details by user_id
  • User Management- create , update, delete
  • Get user information like user's image

Backend Deployment

The backend of this project is deployed on AWS and can be accessed via the following link:

Backend Deployment Link

Backend-Routes

  • User Authentication:
    • POST /users/register: Register a new user.
    • POST /users/login: Log in with a registered user.
    • GET /users/details/{user_id}: Get the user's details by user_id .
    • PUT /users/update: update the user (protected route using JWT).
    • POST /users/image/{user_id}: get user's image.
    • POST /users/insert: insert new user (protected route using JWT).
    • DELETE /users/delete/{user_id}: delete the user using user_id.

Technologies Used

  • Node.js
  • Express.js
  • MySQL
  • Sequelize
  • Sequelize-cli
  • Bcrypt
  • JWT
  • Swagger (for API documentation)

Installation

  1. Clone the repository to your local machine:

    git clone https://github.com/Rubel011/quadb-nodejs-backend.git
    
  2. Navigate to the project directory:

    cd quadb-nodejs-backend
  3. Install the project dependencies:

    npm install 
    
  4. Create a .env file in the project root and configure the following environment variables:

    PORT=your-database-port
    DB_USER=your-database-username
    DB_PASS=your-database-password
    DB_Name=your-database-name
    DB_HOST=your-database-host
    NODE_ENV=production
    ACCESS_TOKEN_SECRET=masai-school-web
    REFRESH_TOKEN_SECRET=masai-school
    ACCESS_TOKEN_EXPIRATION=1d
    REFRESH_TOKEN_EXPIRATION=24d
    EMAIL_ID=nodemailer-email-id
    GOOGLEKEY=nodemailer-google-key
    FRONTEND_DEPLOYED_URL=#
    BACKEND_DEPLOYED_URL=http://localhost:8080/
    
  5. Start the server:

    npm run server
    
  6. Access the backend API at http://localhost:PORT.

mysql-nodejs-backend's People

Contributors

rubel011 avatar

Stargazers

 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.