Skip to content

Commit 8894f37

Browse files
author
shahriarsajeeb
committed
heroku added done for backend
1 parent 24fe50e commit 8894f37

File tree

97 files changed

+5
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+5
-4
lines changed

backend/Procfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: node ./server.js

backend/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ app.use(cors({
1313

1414
app.use(express.json());
1515
app.use(cookieParser());
16-
app.use("/", express.static(path.join(__dirname,"./tmp")));
16+
app.use("/", express.static(path.join(__dirname,"./uploads")));
1717
app.use("/test", (req, res) => {
1818
res.send("Hello world!");
1919
});

backend/multer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const path = require("path");
33

44
const storage = multer.diskStorage({
55
destination: function (req,res,cb){
6-
cb(null, path.join(__dirname, './tmp'));
6+
cb(null, path.join(__dirname, './uploads'));
77
},
88
filename: function (req,file,cb) {
99
const uniqueSuffix = Date.now() + "-" + Math.round(Math.random() * 1e9);

backend/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
"node": "18.x"
88
},
99
"scripts": {
10-
"test": "echo \"Error: no test specified\" && exit 1",
1110
"dev": "nodemon server.js",
12-
"start": "node server.js"
11+
"start": "node server.js",
12+
"heroku-postbuild": "NPM_CONFIG_PRODUCTION=false"
1313
},
1414
"author": "shahriar Sajeeb",
1515
"license": "ISC",

0 commit comments

Comments
 (0)