Application with authentication logic built using Node.js and MongoDB database which allows upon authentication to access a profile page and upload an image file to be displayed on home page.
- Secure user authentication and session management
- Image uploads with previews
Node.js
– Backend runtimeExpress.js
– Web framework for Node.jsEJS
– Templating engine for rendering dynamic contentMongoDB
– NoSQL database for storing dataNodemon
– Automatically restarts the server on file changesBcryptjs
– Password hashingMulter
– Middleware for handling file uploadsExpress-Session
– Session managementUUID
– Unique identifier generationDotenv
– Environment variable management
Clone the repository and install the dependencies:
$ git clone https://github.com/dnmore/mongodb-gallery.git
$ npm install
Create a MongoDB database named gallery
:
use gallery
Set up environment variables for the session secret in a .env
file.
To start the server, run:
$ npm start
The application will be running at http://localhost:3000/
.
This project is licensed under the MIT License.