Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
var http = require('http');
var beeline = require('honeycomb-beeline')({
writeKey: "key",
dataset: "nathanleclaire.nodejsbeelinetest",
serviceName: "frameworks-are-bloated-http-directly-rules"
});
//create a server object:
http.createServer(function (req, res) {
let trace = beeline.startTrace();
res.writeHead(200, {'Content-Type': 'text/html'});
res.write('Hello World!'); //write a response to the client
res.end(); //end the response
beeline.finishTrace(trace);
}).listen(8080); //the server object listens on port 8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment