Skip to content

Commit

Permalink
Add Multer, format and path again
Browse files Browse the repository at this point in the history
  • Loading branch information
David Coder committed Feb 13, 2023
1 parent 6e61877 commit 8d17359
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,19 @@
require('dotenv').config()
const express = require("express");
var cors = require("cors");
var { format } = require("util");
var Multer = require( "multer");
var path = require('path');

const app = express();
const port = process.env.PORT || 5000;

app.use(cors());
const multer = Multer({
storage: Multer.memoryStorage(),
limits: {
fileSize: 5 * 1024 * 1024, // no larger than 5mb, you can change as needed.
},
});

const mongoose = require('mongoose')

Expand Down

0 comments on commit 8d17359

Please sign in to comment.