Git Product home page Git Product logo

project-x's Introduction

Explain endpoint

The web server offers several endpoints for managing user accounts and facilitating administrative tasks. The "GET /" route serves as the Super Admin registration endpoint, rendering the HTML for creating a single Super Admin account. Once an account is created, the endpoint becomes inactive, redirecting subsequent attempts to the login endpoint. The "POST /create/user" endpoint processes the Super Admin registration form, storing the data in the database, and securely hashing the password.

The "GET /" and "POST /login" endpoints handle user login functionality. The former renders the login page, while the latter allows users of all roles to log in. For users added from the dashboard by the Super Admin, the login process includes a "Create New Password" field rather than the traditional "Insert Your Password" field, ensuring a seamless and secure login experience.

Access to the "GET /dashboard" endpoint reveals the dashboard HTML, featuring a user table visible only to the Super Admin. The "POST /add/user" endpoint is reserved for the Super Admin to add users with different roles. Lastly, the "POST /logout" endpoint facilitates the logout process.

Setup

  • Clone Repository
  • Open the project folder with your terminal and type in the following code
    # install repositories 
    npm install 

create a .env file and copy the code from the example.env to the .env file, you can modify the file as necessary

    # to start development server run 
    npm run dev
    # to start production server run 
    npm start

Open the server on your browser and enjoy :)

project-x's People

Contributors

slick-codes 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.