This is a simple file upload application built with Node.js, Express, Multer, and MongoDB. It allows users to upload files, which are then stored in MongoDB Atlas.
- Upload files: Users can upload files using a simple web form.
- Store file data: File data, including the filename and path, is stored in MongoDB Atlas.
- View uploaded files: Users can view a list of uploaded files on the homepage.
- Node.js
- Express.js
- Multer (for file upload handling)
- MongoDB (for storing file data)
- EJS (for server-side rendering)
To run this application locally, follow these steps:
- Clone this repository to your local machine.
- Install dependencies by running
npm install
. - Set up a MongoDB Atlas cluster and obtain a connection string.
- Replace the MongoDB connection string in
app.js
with your own connection string. - Create a directory named
uploads
in the root of the project. - Start the server by running
npm start
. - Open your web browser and navigate to
http://localhost:8000
.
- Access the homepage by navigating to
http://localhost:8000
. - Use the file upload form to select a file and upload it.
- View the list of uploaded files on the homepage.
This project is licensed under the MIT License. See the LICENSE file for details.