This folder contains examples of web applications that demonstrate user authentication using Node.js and Express.js. These examples cover basic login and registration functionality, including form handling, session management, and rendering views with EJS.
- Description: A web app that allows users to log in with a username and password. Upon successful login, users are redirected to a dashboard page.
- How to Run:
- Navigate to the
simple-loginfolder. - Install dependencies:
npm install
- Start the server:
node index.js
- Open your browser and navigate to
http://localhost:3000.
- Navigate to the
- Description: A web app that allows users to register with a username and password, log in, and access a protected dashboard page.
- How to Run:
- Navigate to the
simple-registrationfolder. - Install dependencies:
npm install
- Start the server:
node index.js
- Open your browser and navigate to
http://localhost:3000.
- Navigate to the
- Node.js installed on your machine.
- Each example uses EJS for rendering views and includes basic CSS for styling.
- Static assets (e.g., CSS) are located in the
publicfolder of each app. - View templates are located in the
viewsfolder of each app. - These examples are for demonstration purposes and do not include advanced security measures such as password hashing or database integration.