I have some translation files, and I want to fetch this, but I dont know how can I allow the URL in nodejs express ?
This url I fetch
http://192.168.0.249:4000/public/locales/{{lng}}/translation.json
So how can I say allow all urls in public folder?
like
app.get('*/public') ....
CodePudding user response:
Use the express.static built-in middleware:
app.use(express.static('public'))