How does one display text held in a variable on the server side node.js in html.
In other words, just to be doubly clear, I have output pulled from an api that accesses twitter (Twitt) and I am trying to display that text at the bottom of the page.
This is how the webpage is called
app.get('/', function (req, res) {
res.sendfile('./Homepage.html');
});
This is where the Node.js files are called:
var express = require('express');
var app = express();
And here is where the variable is:
T.get('search/tweets', { q: hash1 + ' since:2013-11-11', count: 5 },
function(err, reply) {
response = (reply),
console.log(response)
app.append(response)
})
Tis. You will need to call that from within your express route to be able to send its output with your response.