whats the diffrence between :-
app.use(’/’, express.static(path.join(__dirname+‘public-static’)))
and
app.use(’/’, express.static(__dirname+‘public-static’))
Diffrence between
Difference between both is just that we are using path.join to join two paths, instead of manually concatenating them. path.join is obviously better way because it takes care of many things, corner cases, etc.
For more info, read ALL the answers provided here:
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.