Skip to content

Instantly share code, notes, and snippets.

@neruthes
Created April 11, 2014 08:09
Show Gist options
  • Select an option

  • Save neruthes/10448887 to your computer and use it in GitHub Desktop.

Select an option

Save neruthes/10448887 to your computer and use it in GitHub Desktop.
var http = new HttpServer();
http.listen(80);
var config = {
"runtime" : function (request, response) {
response.head(200, { 'Content-Tyep' : 'text/plain' });
response.body('Hello World\n');
response.end();
}
}
http.run(config);
@xfoxfu
Copy link
Copy Markdown

xfoxfu commented Aug 27, 2014

On line 5, there may be a mistake.
response.head(200, { 'Content-Tyep' : 'text/plain' });
I think it should be response.head(200, { 'Content-Type' : 'text/plain' });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment