-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5ec6eb0
Showing
5 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
lib-cov | ||
*.seed | ||
*.log | ||
*.csv | ||
*.dat | ||
*.out | ||
*.pid | ||
*.gz | ||
|
||
pids | ||
logs | ||
results | ||
|
||
node_modules | ||
npm-debug.log | ||
|
||
#Ignore sublime files | ||
|
||
#*.sublime-project | ||
#*.sublime-workspace | ||
|
||
#Ignore Azure package crap | ||
local_package* | ||
*.cspkg | ||
*.logs | ||
|
||
#Ignore IISNode stuff | ||
*.debug | ||
|
||
*.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
instant-server | ||
======= | ||
|
||
instant-server turns any directory into an instant file server, and it runs directly from your command line. Install it once per machine and then run it in as many directories as you'd like. | ||
|
||
## HTTP Conventions | ||
|
||
* __GET__ - reads the contents a file from the specified path | ||
* __POST__ - append the contents of a file | ||
* __PUT__ - overwrite the contents of a file | ||
* __DELETE__ - delete a file from the system |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
var http = require("http"); | ||
|
||
var argv = process.argv.slice(2); | ||
console.log(argv); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "instant-server" | ||
, "description":"an instant file server that you can run anywhere from the command line" | ||
, "version": "0.1.0" | ||
, "dependencies" : { | ||
"argparse" : "~0.1.15" | ||
}, | ||
, "author": "Aaron Stannard <aaron@aaronstannard.com>" | ||
, "homepage": "https://github.com/Aaronontheweb/node-slugs" | ||
, "main": "app.js" | ||
, "keywords": ["server", "instant", "files", "fileserver", "file server"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* file: args.js | ||
* description: used to process command-line arguments for instant-server | ||
* author: Aaron Stannard | ||
* created: 8/12/2013 | ||
* last-modified: 8/12/2013 | ||
*/ | ||
|
||
"use strict"; | ||
var ArgumentParser = require("argparse").ArgumentParser; | ||
var parser = new ArgumentParser({ | ||
version: "0.1.0", | ||
addHelp: true, | ||
description: 'instant-server' | ||
}); | ||
|
||
parser.addArgument( | ||
['-d','--dir'], | ||
{ | ||
help: 'the root directory for the server to service its requests', | ||
nargs: 1, | ||
required: false | ||
} | ||
); | ||
|
||
parser.addArgument( | ||
['-r','--readonly'], | ||
{ | ||
help: 'put the server in read-only mode', | ||
nargs: 0, | ||
required: false | ||
} | ||
); |