Original project by rishabhjain21, on "www.geeksforgeeks.org" (step-by-step link below) ☝️
This is project to send and receive images from MongoDB using NodeJs (Multer, Mongoose, Express, Ejs, path, fs...).
# Create folder for store the files, like 'image-uploader'
# Clone the project
git clone https://github.com/BieAnimaton/Image-Uploader-NodeJs-MongoDB
# Install the dependencies
npm install
or
yarn install
# To start
npm start
or
yarn start
# The server will start in port 3000
# Access http://localhost:3000
For connect to your MongoDB database, create ".env" file in project root and write: " MONGO_URL='mongodb+srv://user:user@cluster0.uvjzi.mongodb.net/galeria?retryWrites=true&w=majority' ".
If you want add more params in your MongoDB table, change the file "galeria.js" and modify the "imgSchema", thereafter, complete with same params in "rotas.js", on part called "rotas.post()".
- Node Js
- Express
- Mongoose
- Multer
- Ejs
- Nodemon (development only)