I have the following express code for get method:
var express = require('express');
var app = express();
app.get('/', function(req, res) {
res.sendFile(path.join(__dirname, '../public/index.html'));
});
app.listen(3000);
I want this code snippet to do:
- load a js file from a different server
- embed this js file inside the index.html file that was brought by the get request.