Class Index
-
node
An example of a web server written with Node which responds with 'Hello World':
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/');
To run the server, put the code into a file calledexample.js
and execute it with the node program> node example.js Server running at http://127.0.0.1:8124/
All of the examples in the documentation can be run similarly. -
node.assert
This module is used for writing unit tests for your applications, you can access it with
require('assert')
. -
node.assert.AssertionError
-
node.buffer
-
node.buffer.Buffer
-
node.buffer.SlowBuffer
-
node.child_process
Node provides a tri-directional
popen(3)
facility through theChildProcess
class. -
node.console
-
node.constants
-
node.crypto
Use
require('crypto')
to access this module. -
node.crypto.Cipher
-
node.crypto.Cipher.Buffer
-
node.crypto.Credentials
-
node.crypto.Decipher
-
node.crypto.Decipher.Buffer
-
node.crypto.Hash
-
node.crypto.Hmac
-
node.crypto.Hmac.Buffer
-
node.crypto.Sign
-
node.crypto.Sign.Buffer
-
node.crypto.Verify
-
node.crypto.Verify.Buffer
-
node.dgram
Datagram sockets are available through
require('dgram')
. -
node.dgram.Socket
-
node.dns
Use
require('dns')
to access this module. -
node.events
Many objects in Node emit events: a
net.Server
emits an event each time a peer connects to it, afs.readStream
emits an event when the file is opened. -
node.events.EventEmitter
-
node.freelist
-
node.freelist.FreeList
-
node.fs
File I/O is provided by simple wrappers around standard POSIX functions.
-
node.fs.FileReadStream
-
node.fs.FileWriteStream
-
node.fs.ReadStream
-
node.fs.Stats
-
node.fs.Stats.Buffer
-
node.fs.WriteStream
-
node.global
These object are available in the global scope and can be accessed from anywhere.
-
node.global.Buffer
-
node.http
To use the HTTP server and client one must
require('http')
. -
node.http.Agent
-
node.http.Client
-
node.http.ClientRequest
-
node.http.IncomingMessage
-
node.http.OutgoingMessage
-
node.http.Server
-
node.http.ServerResponse
-
node.https
HTTPS is the HTTP protocol over TLS/SSL.
-
node.https.Server
-
node.module
-
node.net
The
net
module provides you with an asynchronous network wrapper. -
node.net.Server
-
node.net.Socket
-
node.net.Stream
-
node.os
Use
require('os')
to access this module. -
node.path
This module contains utilities for dealing with file paths.
-
node.process
The
process
object is a global object and can be accessed from anywhere. -
node.process.EventEmitter
-
node.process.EventEmitter.Buffer
-
node.querystring
This module provides utilities for dealing with query strings.
-
node.readline
-
node.readline.Interface
-
node.repl
A Read-Eval-Print-Loop (REPL) is available both as a standalone program and easily includable in other programs.
-
node.repl.REPLServer
-
node.stream
-
node.stream.Stream
-
node.string_decoder
-
node.string_decoder.StringDecoder
-
node.sys
-
node.timers
-
node.tls
Use
require('tls')
to access this module. -
node.tls.Server
-
node.tty
Use
require('tty')
to access this module. -
node.tty_posix
-
node.tty_posix.ReadStream
-
node.tty_posix.WriteStream
-
node.tty_win32
-
node.tty_win32.ReadStream
-
node.tty_win32.WriteStream
-
node.url
This module has utilities for URL resolution and parsing.
-
node.util
These functions are in the module
'util'
. -
node.vm
You can access this module with:
var vm = require('vm');
JavaScript code can be compiled and run immediately or compiled, saved, and run later. -
node.vm.Script