{
  "source": "doc/api/synopsis.markdown",
  "miscs": [
    {
      "textRaw": "Synopsis",
      "name": "Synopsis",
      "type": "misc",
      "desc": "<p>An example of a <a href=\"http.html\">web server</a> written with Node which responds with &apos;Hello\nWorld&apos;:\n\n</p>\n<pre><code>var http = require(&apos;http&apos;);\n\nhttp.createServer(function (request, response) {\n  response.writeHead(200, {&apos;Content-Type&apos;: &apos;text/plain&apos;});\n  response.end(&apos;Hello World\\n&apos;);\n}).listen(8124);\n\nconsole.log(&apos;Server running at http://127.0.0.1:8124/&apos;);</code></pre>\n<p>To run the server, put the code into a file called <code>example.js</code> and execute\nit with the node program\n\n</p>\n<pre><code>&gt; node example.js\nServer running at http://127.0.0.1:8124/</code></pre>\n<p>All of the examples in the documentation can be run similarly.\n</p>\n"
    }
  ]
}
