hi,
what is the equivalent to node.js express res.sendfile method and set a static folder like:
app.use(express.static('public')) in a jRDC server?
i would like to send the html + set the root directory (that contains some needed files) when making a request to the server with http://localhost:3000
this is the js code:
thanx
what is the equivalent to node.js express res.sendfile method and set a static folder like:
app.use(express.static('public')) in a jRDC server?
i would like to send the html + set the root directory (that contains some needed files) when making a request to the server with http://localhost:3000
this is the js code:
B4X:
app.use(express.static('public')) // relative path of client-side code
app.get('/', function(req, res) {
res.sendFile('index.html', { root: __dirname })
})
thanx
Last edited: