This project is a secure user registration form developed with Nodejs and Express. It captures user details, including username, email, and password, and securely stores them in a database after hashing the password with bcrypt. Environment variables, like database credentials, are managed with dotenv for secure configuration. Using EJS for templating, the app renders dynamic HTML pages, and nodemon provides a smooth development experience by automatically updating the server on file changes. This project is a solid foundation for learning server-side development, data security, and user authentication.
npm init
npm install express
npm install ejs
npm install mongoose
npm install -D nodemon
mkdir models
mkdir views
mkdir controllers
mkdir db
mkdir routes
cd routes
touch web.js
touch app.js
cd model
User.js
-
cd views
index.ejs
login.ejs
registration.ejs
-
cd partials
footer.ejs
header.ejs
navbar.ejs
step 8: Navigate inside constrollers folder and create a files which will contain our constrollers files:
cd controllers
userController.js
npm install
npm run dev
ornpm start
(http://localhost:3000/
orhttp://localhost:8000/)