### Generate and Start an Express Application Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/express/Readme.md Commands to scaffold a new application, install dependencies, and start the server. ```bash $ npm install -g express $ express /tmp/foo && cd /tmp/foo ``` ```bash $ npm install ``` ```bash $ node app ``` -------------------------------- ### Installation Command Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/fs-extra/node_modules/mkdirp/readme.markdown Install the package using npm. ```bash npm install mkdirp ``` -------------------------------- ### Clone and Run Express Examples Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/express/Readme.md Instructions for cloning the repository and executing specific examples. ```bash $ git clone git://github.com/visionmedia/express.git --depth 1 $ cd express $ npm install ``` ```bash $ node examples/content-negotiation ``` -------------------------------- ### Installation Commands Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/mkdirp/readme.markdown Commands to install the library locally or globally via npm. ```bash npm install mkdirp ``` ```bash npm install -g mkdirp ``` -------------------------------- ### Install multiparty Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/multiparty/README.md Use npm to install the package in your project. ```bash npm install multiparty ``` -------------------------------- ### Installing and Building iisnode Source: https://context7.com/azure/iisnode/llms.txt Commands for setting up samples after installation and building the project from source using MSBuild. ```batch REM Download and install iisnode MSI (choose x86 or x64 based on system) REM x86: https://github.com/azure/iisnode/releases/download/v0.2.21/iisnode-full-v0.2.21-x86.msi REM x64: https://github.com/azure/iisnode/releases/download/v0.2.21/iisnode-full-v0.2.21-x64.msi REM After installation, set up samples from administrative command prompt "%programfiles%\iisnode\setupsamples.bat" REM Access samples at http://localhost/node REM For building from source (x86): msbuild /p:Platform=Win32 src\iisnode\iisnode.sln REM For building from source (x64): msbuild /p:Platform=x64 src\iisnode\iisnode.sln ``` -------------------------------- ### Install node-querystring Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/qs/Readme.md Use npm to install the package in your project. ```bash $ npm install qs ``` -------------------------------- ### Install and Use Opener via CLI Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/opener/README.md Install the package globally and execute commands to open URLs, files, or applications. ```bash npm install opener -g opener http://google.com opener ./my-file.txt opener firefox opener npm run lint ``` -------------------------------- ### Install entities library Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/dom-serializer/node_modules/entities/readme.md Use npm to install the package in your project. ```bash npm i entities ``` -------------------------------- ### CLI Installation and Usage Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/strip-json-comments/readme.md Commands for installing the CLI globally and using it to process files. ```sh $ npm install --global strip-json-comments ``` ```sh $ strip-json-comments --help strip-json-comments input-file > output-file # or strip-json-comments < input-file > output-file ``` -------------------------------- ### Install node-fresh Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/fresh/Readme.md Install the node-fresh module using npm. This command downloads and installs the package and its dependencies. ```bash $ npm install fresh ``` -------------------------------- ### Install mime module Source: https://github.com/azure/iisnode/blob/master/test/performance/www/node_modules/express/node_modules/mime/README.md Install the package using npm. ```bash npm install mime ``` -------------------------------- ### Install isarray with component Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/isarray/README.md Install the 'isarray' module using the component package manager. ```bash $ component install juliangruber/isarray ``` -------------------------------- ### Installation Commands Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/strip-json-comments/readme.md Commands to install the package using various package managers. ```sh $ npm install --save strip-json-comments ``` ```sh $ bower install --save strip-json-comments ``` ```sh $ component install sindresorhus/strip-json-comments ``` -------------------------------- ### Use node-exit to prevent output truncation Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/exit/README.md Install with `npm install exit`. This example demonstrates how to use the `exit` module to ensure console output is not truncated on Windows. ```javascript var exit = require('exit'); // These lines should appear in the output, EVEN ON WINDOWS. console.log("omg"); console.error("yay"); // process.exit(5); exit(5); // These lines shouldn't appear in the output. console.log("wtf"); console.error("bro"); ``` -------------------------------- ### Install supports-color Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/supports-color/readme.md Install the supports-color package using npm. ```sh $ npm install --save supports-color ``` -------------------------------- ### Install qs Package Source: https://github.com/azure/iisnode/blob/master/test/performance/www/node_modules/express/node_modules/qs/Readme.md Install the 'qs' package using npm. This is the first step to using the library in your Node.js project. ```bash npm install qs ``` -------------------------------- ### Install ShellJS Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/shelljs/README.md Install the package via npm. Use the -g flag for global installation to enable the shjs command-line tool. ```bash $ npm install [-g] shelljs ``` ```bash $ shjs my_script ``` -------------------------------- ### Install ws Package Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/ws/README.md Install the ws library using npm. This is the first step to using the WebSocket functionality. ```bash npm install ws ``` -------------------------------- ### Install iisnode from Download Source: https://github.com/azure/iisnode/wiki/iisnode-wiki Download and unzip the desired build of iisnode, then run the install.bat script. This method is for installing pre-compiled binaries. ```bash call install.bat ``` -------------------------------- ### Install Commander Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/commander/Readme.md Use npm to install the commander package. ```bash $ npm install commander ``` -------------------------------- ### Installation Commands Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/diff/README.md Methods to install the jsdiff library via npm, bower, or git. ```bash npm install diff ``` ```bash bower install jsdiff ``` ```bash git clone git://github.com/kpdecker/jsdiff.git ``` -------------------------------- ### Async.js Quick Examples Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/async/README.md Demonstrates common usage patterns for async.map, async.filter, async.parallel, and async.series. ```javascript async.map(['file1','file2','file3'], fs.stat, function(err, results){ // results is now an array of stats for each file }); ``` ```javascript async.filter(['file1','file2','file3'], fs.exists, function(results){ // results now equals an array of the existing files }); ``` ```javascript async.parallel([ function(){ ... }, function(){ ... } ], callback); ``` ```javascript async.series([ function(){ ... }, function(){ ... } ]); ``` -------------------------------- ### Install supports-color Globally Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/supports-color/readme.md Install the supports-color package globally for CLI usage. ```sh $ npm install --global supports-color ``` -------------------------------- ### Install notify-send on Ubuntu Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/growl/Readme.md Install the notify-send command-line utility on Ubuntu/Linux via the libnotify-bin package. ```bash $ sudo apt-get install libnotify-bin ``` -------------------------------- ### Install range-parser Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/range-parser/Readme.md Install the range-parser module using npm. ```bash $ npm install range-parser ``` -------------------------------- ### Create a CLI tool with help and usage Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/yargs/README.md Configure usage messages, examples, and required arguments for a CLI application. ```javascript #!/usr/bin/env node var argv = require('yargs') .usage('Count the lines in a file.\nUsage: $0') .example('$0 -f', 'count the lines in the given file') .demand('f') .alias('f', 'file') .describe('f', 'Load a file') .argv ; var fs = require('fs'); var s = fs.createReadStream(argv.file); var lines = 0; s.on('data', function (buf) { lines += buf.toString().match(/\n/g).length; }); s.on('end', function () { console.log(lines); }); ``` -------------------------------- ### Install Chai via Component Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/chai/ReleaseNotes.md Use the component CLI to install the latest version of Chai. ```bash $ component install chaijs/chai ``` -------------------------------- ### Install fs-extra Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/fs-extra/README.md Command to install the module via npm. ```bash npm install --save fs-extra ``` -------------------------------- ### Install deep-eql via component Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/deep-eql/README.md Use component to install the package for browser-based projects. ```bash $ component install chaijs/deep-eql ``` -------------------------------- ### Install Batch Package Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/batch/Readme.md Install the 'batch' package using npm. This is the first step before using its features. ```bash npm install batch ``` -------------------------------- ### Install isarray with npm Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/isarray/README.md Install the 'isarray' module using npm for use in your Node.js projects or for browser bundling. ```bash $ npm install isarray ``` -------------------------------- ### Install growl via npm Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/growl/Readme.md Install the growl npm package for Node.js. ```bash $ npm install growl ``` -------------------------------- ### Basic Usage Example Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/compression/README.md Demonstrates how to use the compression middleware with Node.js http server. ```javascript var compress = require('compression')() http.createServer(function (req, res) { compress(req, res, function (err) { if (err) throw err res.end('hello world') }) }) ``` -------------------------------- ### Install deep-eql via npm Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/deep-eql/README.md Use npm to install the package in a Node.js environment. ```bash $ npm install deep-eql ``` -------------------------------- ### Installing brace-expansion via npm Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/brace-expansion/README.md Use this command to install the brace-expansion package from npm into your project. ```bash npm install brace-expansion ``` -------------------------------- ### Connect/Express Usage Example Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/compression/README.md Shows how to integrate the compression middleware into a Connect or Express application. ```javascript var app = require('connect')() app.use(require('compression')()) // Or with Express: // var express = require('express') // var app = express() // app.use(require('compression')()) ``` -------------------------------- ### Display Custom Help Output Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/commander/Readme.md The resulting output when running the custom help example. ```text Usage: custom-help [options] Options: -h, --help output usage information -V, --version output the version number -f, --foo enable some foo -b, --bar enable some bar -B, --baz enable some baz Examples: $ custom-help --help $ custom-help -h ``` -------------------------------- ### Install balanced-match via npm Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/balanced-match/README.md Command to install the package using the Node Package Manager. ```bash npm install balanced-match ``` -------------------------------- ### Create a Basic Express Server Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/express/Readme.md Initializes an Express application and starts a server listening on port 3000. ```javascript var express = require('express'); var app = express(); app.get('/', function(req, res){ res.send('Hello World'); }); app.listen(3000); ``` -------------------------------- ### Basic Usage Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/send/Readme.md A simple example demonstrating how to use 'send' to serve static files from the request URL. ```APIDOC ## Basic Usage Example ### Description This example shows a minimal setup for serving static files using the 'send' module. ### Method HTTP Server Creation ### Endpoint N/A (Illustrative Example) ### Request Body N/A ### Response Serves static files based on the request URL. ### Request Example ```javascript var http = require('http'); var send = require('send'); var app = http.createServer(function(req, res){ send(req, req.url).pipe(res); }).listen(3000); ``` ``` -------------------------------- ### Install Development Dependencies Source: https://github.com/azure/iisnode/blob/master/test/performance/www/node_modules/express/node_modules/qs/Readme.md Install development dependencies for the 'qs' project using npm. This is typically done before running tests or contributing to the library. ```bash npm install -d ``` -------------------------------- ### Install cookie package Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/cookie-parser/node_modules/cookie/README.md Install the 'cookie' package using npm. This is the first step before using its functionalities. ```bash npm install cookie ``` -------------------------------- ### Run Tests Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/qs/Readme.md Commands to install development dependencies and execute the test suite. ```bash $ npm install -d ``` ```bash $ make test ``` ```bash $ open test/browser/index.html ``` -------------------------------- ### Install htmlparser2 Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/htmlparser2/README.md Install the htmlparser2 package using npm. This is the first step to using the library in your Node.js project. ```bash npm install htmlparser2 ``` -------------------------------- ### Parse non-hyphenated arguments with yargs Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/yargs/README.md This example shows how to capture arguments that do not start with a hyphen using `argv._`. ```javascript #!/usr/bin/env node var argv = require('yargs').argv; console.log('(%d,%d)', argv.x, argv.y); console.log(argv._); ``` -------------------------------- ### Manage configuration options with options.js Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/options/README.md Demonstrates initializing an Options object with defaults, merging user options, resetting, copying attributes, and reading configuration from files synchronously or asynchronously. ```javascript var Options = require("options"); // Create an Options object function foo(options) { var default_options = { foo : "bar" }; // Create an option object with default value var opts = new Options(default_options); // Merge options opts = opts.merge(options); // Reset to default value opts.reset(); // Copy selected attributes out var seled_att = opts.copy("foo"); // Read json options from a file. opts.read("options.file"); // Sync opts.read("options.file", function(err){ // Async if(err){ // If error occurs console.log("File error."); }else{ // No error } }); // Attributes defined or not opts.isDefinedAndNonNull("foobar"); opts.isDefined("foobar"); } ``` -------------------------------- ### Install iisnode After Build Source: https://github.com/azure/iisnode/wiki/iisnode-wiki Execute the install batch script located in the build output directory after successfully building the iisnode project. ```bash build\debug\install.bat ``` -------------------------------- ### Install Formidable Manually Source: https://github.com/azure/iisnode/blob/master/test/performance/www/node_modules/express/node_modules/connect/node_modules/formidable/Readme.md Clone the repository from GitHub to include the library in your project manually. ```bash git clone git://github.com/felixge/node-formidable.git formidable vim my.js # var formidable = require('./formidable'); ``` -------------------------------- ### Basic Batch Processing Example Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/batch/Readme.md Demonstrates setting concurrency, pushing tasks, and handling completion. Ensure 'ids' and 'User.get' are defined in your scope. ```javascript var Batch = require('batch') , batch = new Batch; batch.concurrency(4); ids.forEach(function(id){ batch.push(function(done){ User.get(id, done); }); }); batch.on('progress', function(e){ }); batch.end(function(err, users){ }); ``` -------------------------------- ### Install JSHint RC via NPM Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/jshint/CHANGELOG.md Use this command to install the specific release candidate version directly from the GitHub archive. ```bash $ npm install https://github.com/jshint/jshint/archive/1.0.0-rc1.tar.gz ``` -------------------------------- ### Install minimist Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/minimist/readme.markdown Install the package via npm. ```bash npm install minimist ``` -------------------------------- ### List Files with ls Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/shelljs/README.md Demonstrates usage of the ls command with various options and path arguments. ```javascript ls('projs/*.js'); ls('-R', '/users/me', '/tmp'); ls('-R', ['/users/me', '/tmp']); // same as above ``` -------------------------------- ### Create a basic static file server Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/send/Readme.md A minimal example of using the send library to serve files via an HTTP server. ```js var http = require('http'); var send = require('send'); var app = http.createServer(function(req, res){ send(req, req.url).pipe(res); }).listen(3000); ``` -------------------------------- ### iisnode.yml Configuration Example Source: https://github.com/azure/iisnode/blob/master/src/samples/configuration/readme.htm This YAML file provides an example of how to override iisnode configuration settings. It demonstrates setting the number of Node.js processes per application and increasing the maximum request buffer size. ```yaml # This is a sample iisnode.yml file nodeProcessCountPerApplication: 2 maxRequestBufferSize: 8192 # increasing from the default # maxConcurrentRequestsPerProcess: 512 - commented out setting ``` -------------------------------- ### View balanced-match output Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/balanced-match/README.md The expected output when running the balanced-match example script. ```bash $ node example.js { start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' } { start: 3, end: 9, pre: 'pre', body: 'first', post: 'between{second}post' } ``` -------------------------------- ### Run Tests Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/ws/README.md Command to execute the test suite for the ws library. Ensure you have the project cloned and dependencies installed. ```bash make test ``` -------------------------------- ### Run the Express Test Suite Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/express/Readme.md Commands to install development dependencies and execute the test suite. ```bash $ npm install ``` ```bash $ make test ``` -------------------------------- ### Install scmp Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/scmp/README.md Install the scmp module using npm. ```bash npm install scmp ``` -------------------------------- ### Clone and Configure Repository Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/chai/CONTRIBUTING.md Initial setup for a local development environment by cloning a fork and adding the upstream remote. ```bash # Clone your fork of the repo into the current directory git clone https://github.com// # Navigate to the newly cloned directory cd # Assign the original repo to a remote called "upstream" git remote add upstream https://github.com// ``` -------------------------------- ### Example Argument Parsing Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/mocha/node_modules/minimist/readme.markdown Demonstrates how minimist parses arguments with short flags and values. ```bash $ node example/parse.js -a beep -b boop { _: [], a: 'beep', b: 'boop' } ``` -------------------------------- ### Implement Custom Help Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/commander/Readme.md Listen for the --help event to display custom help information before the program exits. ```javascript #!/usr/bin/env node /** * Module dependencies. */ var program = require('../'); function list(val) { return val.split(',').map(Number); } program .version('0.0.1') .option('-f, --foo', 'enable some foo') .option('-b, --bar', 'enable some bar') .option('-B, --baz', 'enable some baz'); // must be before .parse() since // node's emit() is immediate program.on('--help', function(){ console.log(' Examples:'); console.log(''); console.log(' $ custom-help --help'); console.log(' $ custom-help -h'); console.log(''); }); program.parse(process.argv); console.log('stuff'); ``` -------------------------------- ### Basic Connect Server Setup Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/connect/Readme.md Sets up a basic Connect server with common middleware like favicon, logger, static file serving, directory listing, cookie parsing, and session management. It listens on port 3000. ```javascript var connect = require('connect') , http = require('http'); var app = connect() .use(connect.favicon()) .use(connect.logger('dev')) .use(connect.static('public')) .use(connect.directory('public')) .use(connect.cookieParser()) .use(connect.session({ secret: 'my secret here' })) .use(function(req, res){ res.end('Hello from Connect!\n'); }); http.createServer(app).listen(3000); ``` -------------------------------- ### Install buffer-crc32 Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/buffer-crc32/README.md Use npm to install the package in your project. ```bash npm install buffer-crc32 ``` -------------------------------- ### Express Application Server Setup Source: https://github.com/azure/iisnode/blob/master/src/samples/express/readme.htm Initializes an Express server and defines route handlers for specific URL paths. ```javascript var express = require('express'); var app = express.createServer(); app.get('/node/express/myapp/foo', function (req, res) { res.send('Hello from foo! [express sample]'); }); app.get('/node/express/myapp/bar', function (req, res) { res.send('Hello from bar! [express sample]'); }); app.listen(process.env.PORT); ``` -------------------------------- ### Install Express Globally Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/express/Readme.md Installs the Express package globally using npm. ```bash $ npm install -g express ``` -------------------------------- ### Install escape-string-regexp Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/escape-string-regexp/readme.md Install the package via npm to include it in your project dependencies. ```sh $ npm install --save escape-string-regexp ``` -------------------------------- ### Install cookie-parser package Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/cookie-parser/README.md Use npm to install the cookie-parser package in your project. ```shell npm install cookie-parser ``` -------------------------------- ### Setup Session Store with Options Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/express-session/README.md Use this middleware before session() to handle cookies. Configure secret, key, and cookie settings. ```javascript app.use(connect.cookieParser()) app.use(connect.session({ secret: 'keyboard cat', key: 'sid', cookie: { secure: true }})) ``` -------------------------------- ### Install Lodash Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/lodash/README.md Commands to install lodash globally and as a project dependency using npm. ```bash $ {sudo -H} npm i -g npm\n$ npm i --save lodash ``` -------------------------------- ### mkdirp.sync(dir, opts) Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/mocha/node_modules/mkdirp/readme.markdown Synchronously create a new directory and any necessary subdirectories. ```APIDOC ## mkdirp.sync(dir, opts) ### Description Synchronously create a new directory and any necessary subdirectories at `dir` with octal permission string `opts.mode`. ### Parameters #### Path Parameters - **dir** (string) - Required - The directory path to create. #### Options - **opts.mode** (string) - Optional - Octal permission string. Defaults to 0777 & (~process.umask()). - **opts.fs** (object) - Optional - Alternate fs implementation with mkdirSync and statSync methods. ### Returns - **made** (string) - The first directory that had to be created, if any. ``` -------------------------------- ### JSON with Comments Example Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/strip-json-comments/readme.md Example of a JSON structure containing both single-line and multi-line comments. ```js { // rainbows "unicorn": /* ❤ */ "cake" } ``` -------------------------------- ### Initialize Yargs with custom arguments Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/yargs/README.md Demonstrates different ways to initialize Yargs with custom argument arrays. ```javascript require('yargs').argv ``` ```javascript require('yargs')([ '-x', '1', '-y', '2' ]).argv ``` ```javascript require('yargs').parse([ '-x', '1', '-y', '2' ]) ``` -------------------------------- ### wscat Command Line Client Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/ws/README.md Instructions for installing and using the `wscat` command-line utility to connect to a WebSocket server. This is useful for debugging. ```bash npm install -g ws wscat -c ws://echo.websocket.org ``` -------------------------------- ### Install deep-extend Module Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/deep-extend/README.md Install the 'deep-extend' module using npm. This is a prerequisite for using its functionalities. ```bash npm install deep-extend ``` -------------------------------- ### Install concat-map via npm Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/concat-map/README.markdown Command to install the package using the Node Package Manager. ```bash npm install concat-map ``` -------------------------------- ### Install and Test Yargs Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/yargs/README.md Installation via npm or cloning the repository, followed by running tests with expresso. ```bash npm install yargs ``` ```bash git clone http://github.com/chevex/yargs.git ``` ```bash expresso ``` -------------------------------- ### Generate and Print Help Output Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/yargs/README.md Use .help() to retrieve the generated usage string or .showHelp() to print it directly to the console. ```javascript var yargs = require("yargs") .usage("$0 -operand1 number -operand2 number -operation [add|subtract]"); console.log(yargs.help()); ``` ```javascript var yargs = require("yargs") .usage("$0 -operand1 number -operand2 number -operation [add|subtract]"); yargs.showHelp(); ``` -------------------------------- ### Install utils-merge Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/utils-merge/README.md Install the utils-merge package using npm. This command should be run in your project's terminal. ```bash $ npm install utils-merge ``` -------------------------------- ### Install setimmediate via npm Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/setimmediate/README.md Install the setimmediate package using npm for use in Node.js applications. ```bash npm install setimmediate ``` -------------------------------- ### Initialize configuration with defaults Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/rc/README.md Pass the application name and a defaults object to rc to receive a merged configuration object. ```javascript var conf = require('rc')(appname, { //defaults go here. port: 2468, //defaults which are objects will be merged, not replaced views: { engine: 'jade' } }); ``` -------------------------------- ### Import basic-auth-connect Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/basic-auth-connect/README.md Initializes the middleware module. ```javascript var basicAuth = require('basic-auth-connect'); ``` -------------------------------- ### Static File Server with Daemon and Logging Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/cli/README.md Creates a static file server with optional daemon and logging capabilities. Requires 'creationix' and 'daemon' npm packages. Plugins are enabled using `cli.enable()`. ```javascript var cli = require('cli').enable('daemon', 'status'); //Enable 2 plugins cli.parse({ log: ['l', 'Enable logging'], port: ['p', 'Listen on this port', 'number', 8080], serve: [false, 'Serve static files from PATH', 'path', './public'] }); cli.main(function(args, options) { var server, middleware = []; if (options.log) { this.debug('Enabling logging'); middleware.push(require('creationix/log')()); } this.debug('Serving files from ' + options.serve); middleware.push(require('creationix/static')('/', options.serve, 'index.html')); server = this.createServer(middleware).listen(options.port); this.ok('Listening on port ' + options.port); }); ``` -------------------------------- ### Initialize multiparty Form Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/multiparty/README.md Create a new form instance with optional configuration settings. ```javascript var form = new multiparty.Form(options) ``` -------------------------------- ### Install Formidable via npm Source: https://github.com/azure/iisnode/blob/master/test/performance/www/node_modules/express/node_modules/connect/node_modules/formidable/Readme.md Use the npm package manager to install the latest version of the Formidable library. ```bash npm install formidable@latest ``` -------------------------------- ### Serve static files with connect Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/serve-static/Readme.md Initializes a connect application and configures serve-static to serve files from the public/ftp directory with custom index files. ```js var connect = require('connect'); var serveStatic = require('serve-static'); var app = connect(); app.use(serveStatic('public/ftp', {'index': ['default.html', 'default.htm']})); app.listen(); ``` -------------------------------- ### Install keypress Module Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/keypress/README.md Install the keypress module using npm. Add it to your package.json dependencies for project management. ```bash npm install keypress ``` -------------------------------- ### mkdirp.sync(dir, mode) Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/mkdirp/readme.markdown Synchronously create a new directory and any necessary subdirectories. ```APIDOC ## mkdirp.sync(dir, mode) ### Description Synchronously create a new directory and any necessary subdirectories at `dir` with octal permission string `mode`. ### Parameters - **dir** (string) - Required - The path to the directory to create. - **mode** (string) - Optional - Octal permission string. Defaults to `0777 & (~process.umask())`. ### Response - **Returns** (string) - The first directory that had to be created, if any. ``` -------------------------------- ### Install node-bytes Library Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/bytes/Readme.md Install the bytes library using npm for Node.js projects or component for front-end projects. ```bash $ npm install bytes $ component install visionmedia/bytes.js ``` -------------------------------- ### mkdirp(dir, opts, cb) Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/mocha/node_modules/mkdirp/readme.markdown Asynchronously create a new directory and any necessary subdirectories. ```APIDOC ## mkdirp(dir, opts, cb) ### Description Create a new directory and any necessary subdirectories at `dir` with octal permission string `opts.mode`. ### Parameters #### Path Parameters - **dir** (string) - Required - The directory path to create. #### Options - **opts.mode** (string) - Optional - Octal permission string. Defaults to 0777 & (~process.umask()). - **opts.fs** (object) - Optional - Alternate fs implementation with mkdir and stat methods. ### Callback - **cb(err, made)** - Fires with the error or the first directory `made` that had to be created. ``` -------------------------------- ### Define directory creation methods Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/jade/node_modules/mkdirp/README.markdown Reference for the available asynchronous and synchronous directory creation methods. ```javascript var mkdirp = require('mkdirp'); mkdirp(dir, mode, cb) ``` ```javascript mkdirp.sync(dir, mode) ``` -------------------------------- ### Building the iisnode installer Source: https://github.com/azure/iisnode/wiki/iisnode-faq Execute this command from an administrative command line to build the iisnode MSI package after rebuilding the solution in Visual Studio. ```cmd build\debug\%PROCESSOR_ARCHITECTURE%\iisnode.msi ``` -------------------------------- ### Install terminal-notifier on Mac OS X Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/growl/Readme.md Install the terminal-notifier gem for OS X 10.8+ to support Notification Center. ```bash $ sudo gem install terminal-notifier ``` -------------------------------- ### Run Tests with npm Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/utils-merge/README.md Install project dependencies and run tests using npm. This is typically done to verify the package's functionality. ```bash $ npm install $ npm test ``` -------------------------------- ### Get NanFalse Handle Source: https://github.com/azure/iisnode/blob/master/src/iisnode/node-inspector-0.7.3/node_modules/node-inspector/node_modules/nan/README.md Use NanFalse() to get a handle to the V8 false primitive value. Prefer this over V8's False(). ```c++ Handle NanFalse() ```