/upload-photos-nodejs

Discover how to upload photos in Node.js using Multer and MongoDB

Primary LanguageJavaScript

Upload Photos Web App

Upload Photos Web App Screenshot

Purpose

Develop a simple Node.js web app to upload photos as an example for a future tutorial.

Technologies

The web app uses Node.js with Express as the web server.

Multer uploads a photo, Sharp resizes the photo to 300px, and fs saves the photo in the /public/img/uploads directory. Then, the file's information is stored in a MongoDB collection, the user is redirected back to the homepage, and the photo gallery is displayed using EJS templating.

The PlainCSS framework is used for input and text styling.