I created a js file that allow me to retrieve/output the data from an api, how would i display this file to a html page.
was using node.js to compile my data through the terminal
If you guys know a bunch a method , please link me it. thank you.
var realmStatus = "http://api.dol.gov/V1/Statistics/OES/OE_OCCUPATION/?KEY=1ce7650d-b131-4fb7-91b3-b7761efc8cd4";
var http = require("http");
var options = {
host: 'api.dol.gov',
path: realmStatus,
type: 'GET',
dataType: 'json',
accept: 'application/json'
};
console.log("Start");
var x = http.request(options,function(res){
console.log("Connected");
res.on('data',function(data){
data =JSON.stringify(data.toString());
data =JSON.parse(data.toString());
console.log(data.toString()+"\n");
});
}});
x.end();