Skip to content
Myr

Started bin/express

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent 3da7572 · Browse files · 2 files+53 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+53 added−1 removed

  • other:+53 added−1 removed

2 files+53 added−1 removed

added:bin/express+52 added
1#!/usr/bin/env node23/**4 * Module dependencies.5 */67var sys = require('sys');89/**10 * Framework version.11 */1213var version = '1.0.0';1415/**16 * Usage documentation.17 */1819var usage = ''20 + '\x1b[1mUsage\x1b[0m: express [options] [PATH]\n'21 + '\n'22 + '\x1b[1mOptions\x1b[0m:\n'23 + ' -v, --version Output framework version\n'24 + ' -h, --help Output help information\n'2526// Parse arguments2728var args = process.argv.slice(2);29while (args.length) {30 var arg = args.shift();31 switch (arg) {32 case '-h':33 case '--help':34 abort(usage);35 break;36 case '-v':37 case '--version':38 abort(version);39 break;40 }41}4243/**44 * Exit with the given `str`.45 *46 * @param {String} str47 */4849function abort(str) {50 sys.error(str);51 process.exit(1);52}
modified:lib/express/view.js+1 added-1 removed