ilan Expert Licensed User Longtime User Feb 22, 2021 #1 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: B4X: Copy 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: Feb 22, 2021
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: B4X: Copy app.use(express.static('public')) // relative path of client-side code app.get('/', function(req, res) { res.sendFile('index.html', { root: __dirname }) }) thanx
Erel B4X founder Staff member Licensed User Longtime User Feb 22, 2021 #2 Your question has nothing to do with jRDC2. jRDC2 is a specific implementation of a database middleware server based on jServer. Start here: [Server] Building web servers with B4J Upvote 0
Your question has nothing to do with jRDC2. jRDC2 is a specific implementation of a database middleware server based on jServer. Start here: [Server] Building web servers with B4J
ilan Expert Licensed User Longtime User Feb 22, 2021 #3 Erel said: Your question has nothing to do with jRDC2. jRDC2 is a specific implementation of a database middleware server based on jServer. Start here: [Server] Building web servers with B4J Click to expand... sorry, this is what I meant. my mistake. thanx for the link will have a look at it. Upvote 0
Erel said: Your question has nothing to do with jRDC2. jRDC2 is a specific implementation of a database middleware server based on jServer. Start here: [Server] Building web servers with B4J Click to expand... sorry, this is what I meant. my mistake. thanx for the link will have a look at it.
ilan Expert Licensed User Longtime User Feb 22, 2021 #4 Erel said: Start here: [Server] Building web servers with B4J Click to expand... wow, erel this is amazing what you have done. all those amazing examples. this is exactly what i was looking for. thank you very much! Upvote 0
Erel said: Start here: [Server] Building web servers with B4J Click to expand... wow, erel this is amazing what you have done. all those amazing examples. this is exactly what i was looking for. thank you very much!