Permalink
Browse files

remove faye support

  • Loading branch information...
1 parent 36e9ba8 commit 2371cb18fd2f7e6542e9808958d5bd8dc2ad6160 @omphalos committed Sep 10, 2012
Showing with 3 additions and 18 deletions.
  1. +1 −2 README.md
  2. +1 −12 bin/crud-file-server
  3. +0 −2 crud-file-server.js
  4. +1 −2 package.json
View
@@ -14,15 +14,14 @@ This starts a file server using the specified command-line options.
-f file system path to expose over http
-h log head requests
- -m vpath to use to mount the faye server (omit to disable publication)
-p port to listen on (example, 80)
-q suppress this message
-r read only
-v virtual path to host the file server on
Example:
- crud-file-server -f c:/ -p 8080 -q -m /faye -v filez
+ crud-file-server -f c:/ -p 8080 -q -v filez
Supported operations
====================
View
@@ -13,15 +13,14 @@ if(!argv.q) {
console.log('');
console.log(' -f file system path to expose over http');
console.log(' -h log head requests');
- console.log(' -m vpath to use the mount the faye server (omit to disable publication)');
console.log(' -p port to listen on (example, 80)');
console.log(' -q suppress this message');
console.log(' -r read only');
console.log(' -v virtual path to host the file server on');
console.log('');
console.log('example:');
console.log('');
- console.log(' crud-file-server -f c:/ -p 8080 -q -m /faye -v filez');
+ console.log(' crud-file-server -f c:/ -p 8080 -q -v filez');
console.log('');
}
@@ -30,16 +29,6 @@ var path = argv.f || process.cwd();
var vpath = (argv.v || '').trimLeft();
var readOnly = argv.v;
var logHeadRequests = argv.h;
-var publish = function() {};
-if(argv.m) {
- var faye = require('faye');
- var server = new faye.NodeAdapter({mount: argv.m});
- console.log('faye server listening on ' + argv.p);
- server.listen(argv.p);
- publish = function(message) {
- server.publish('/', message);
- };
-}
require('http').createServer(function (req, res) {
server.handleRequest(vpath, path, req, res, publish, readOnly, logHeadRequests);
View
@@ -1,6 +1,4 @@
-var http = require("http");
var fs = require('fs');
-var faye = require('faye');
// don't let users crawl up the folder structure by using a/../../../c/d
var cleanUrl = function(url) {
View
@@ -1,6 +1,6 @@
{
"name": "crud-file-server",
- "version": "0.3.0",
+ "version": "0.4.0",
"description": "file server supporting basic create, read, update, & delete for any kind of file",
"bin": {
"crud-file-server": "./bin/crud-file-server"
@@ -18,7 +18,6 @@
],
"dependencies": {
"optimist": "0.3.4",
- "faye": "0.8.3",
"mime": "1.2.7"
},
"license": "unlicense",

0 comments on commit 2371cb1

Please sign in to comment.