{"_id":"3w","_rev":"13-e8f05dd8f2333ce3c5371160588baeec","name":"3w","description":"Simple express server for static file delivering","dist-tags":{"latest":"0.0.4"},"versions":{"0.0.1":{"name":"3w","version":"0.0.1","description":"Simple express server for static file delivering","main":"3w.js","repository":{"type":"git","url":"https://github.com/mehranhatami/3w.git"},"keywords":["server","static"],"author":{"name":"Mehran Hatami","email":"mehranhatamie@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/mehranhatami/3w/issues"},"homepage":"https://github.com/mehranhatami/3w","dependencies":{"body-parser":"^1.10.0","cookie-parser":"^1.3.3","express":"^4.10.6","morgan":"^1.5.0"},"gitHead":"81e7a6e31322f62929dcfddfe40ce4a81b45f325","_id":"3w@0.0.1","scripts":{},"_shasum":"a1662096f79c08a5ccd461f956f3442fc7a14015","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"mehranhatami","email":"mehranhatamie@gmail.com"},"maintainers":[{"name":"mehranhatami","email":"mehranhatamie@gmail.com"}],"dist":{"shasum":"a1662096f79c08a5ccd461f956f3442fc7a14015","tarball":"https://registry.npmjs.org/3w/-/3w-0.0.1.tgz","integrity":"sha512-VdvNvufBZKTBg7rQ19DJI/j4C1XuD4xS4Amh4AOa5UeK/n1iGIpFTfqnna9fUhnzNP0/BZxwJ8dkADumYdnxfw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEJq4619y7QAtHOp1cMPCL95aCwFaMIP+t7WrqpKEUv9AiB/cyDhJxzHpRmRqT2diERGqJe7VorChgAPBN5Vr7XioA=="}]}},"0.0.2":{"name":"3w","version":"0.0.2","description":"Simple express server for static file delivering","main":"3w.js","repository":{"type":"git","url":"https://github.com/mehranhatami/3w.git"},"keywords":["server","static"],"author":{"name":"Mehran Hatami","email":"mehranhatamie@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/mehranhatami/3w/issues"},"homepage":"https://github.com/mehranhatami/3w","dependencies":{"body-parser":"^1.10.0","cookie-parser":"^1.3.3","express":"^4.10.6","morgan":"^1.5.0"},"gitHead":"fc75ef1f9551bf42c3a562ff7b252492ce9bf584","_id":"3w@0.0.2","scripts":{},"_shasum":"6d25e401a7276d77cbe7cd09b4745d9f69066ed5","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"mehranhatami","email":"mehranhatamie@gmail.com"},"maintainers":[{"name":"mehranhatami","email":"mehranhatamie@gmail.com"}],"dist":{"shasum":"6d25e401a7276d77cbe7cd09b4745d9f69066ed5","tarball":"https://registry.npmjs.org/3w/-/3w-0.0.2.tgz","integrity":"sha512-3RWvtpzSeKyogyRQx7qRrriEDky6SeGCisYM9lSqbBD2cG74uU4bM4Vu8jJVDMQqsc92uXqnBhB+Rru1PA/jjQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCg5SFyXoVrUKaiHMPFhuIappFbMr7+1BEu5K+fTBmhlgIgBSn8uXgNkJefoMwLcDfYQZie16u2iyISaa4KcQOzBF0="}]}},"0.0.3":{"name":"3w","version":"0.0.3","description":"Simple express server for static file delivering","main":"3w.js","repository":{"type":"git","url":"https://github.com/mehranhatami/3w.git"},"keywords":["server","static"],"author":{"name":"Mehran Hatami","email":"mehranhatamie@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/mehranhatami/3w/issues"},"homepage":"https://github.com/mehranhatami/3w","dependencies":{"body-parser":"^1.10.0","cookie-parser":"^1.3.3","express":"^4.10.6","morgan":"^1.5.0"},"gitHead":"90df49a167a1cbaea13aabaf3f8cd9d3087417ae","_id":"3w@0.0.3","scripts":{},"_shasum":"7001ae8e4e5ebb8797c8dde38a6b0604435ba692","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"mehranhatami","email":"mehranhatamie@gmail.com"},"maintainers":[{"name":"mehranhatami","email":"mehranhatamie@gmail.com"}],"dist":{"shasum":"7001ae8e4e5ebb8797c8dde38a6b0604435ba692","tarball":"https://registry.npmjs.org/3w/-/3w-0.0.3.tgz","integrity":"sha512-ROqd/EtjmkSil9RuMWE5pU5gQUKTrxM10SLKEfLuqsIp78AnGuHhUMiQFMcZxSWO1XnAUTy+1OxXBqJVf1N6ag==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICdwZdONOl13poxWvbXMFJy6GS9F28md4yH2dGuEF4OcAiAe/7aY81W5PQegjwR4OKZi8kuz4tWWfxEvBngIvVGJbQ=="}]}},"0.0.31":{"name":"3w","version":"0.0.31","description":"Simple express server for static file delivering","main":"3w.js","repository":{"type":"git","url":"https://github.com/mehranhatami/3w.git"},"keywords":["server","static"],"author":{"name":"Mehran Hatami","email":"mehranhatamie@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/mehranhatami/3w/issues"},"homepage":"https://github.com/mehranhatami/3w","dependencies":{"body-parser":"^1.10.0","cookie-parser":"^1.3.3","express":"^4.10.6","morgan":"^1.5.0"},"gitHead":"e6be064ee8495a2e2b177656bf9eac1e5d17cc34","_id":"3w@0.0.31","scripts":{},"_shasum":"4fdd110d76875b176abb5dbe5c278cd21e831845","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"mehranhatami","email":"mehranhatamie@gmail.com"},"maintainers":[{"name":"mehranhatami","email":"mehranhatamie@gmail.com"}],"dist":{"shasum":"4fdd110d76875b176abb5dbe5c278cd21e831845","tarball":"https://registry.npmjs.org/3w/-/3w-0.0.31.tgz","integrity":"sha512-A1f89WWFRg5jj9t+xzwH65dwAhTX4H4j9zYTNb07NOB5syH1BWrNos9fUbtZFFrx2y8p4pQTL2xgveEG0pRHPQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHe612lxdKp4WdRu8G4ioVInjHpyQKtX+L7m3wOKezVNAiACXBwKiSNXIDwKQHQ4mfAbMlgZoqNmTuSiNrTTtcevTA=="}]}},"0.0.4":{"name":"3w","version":"0.0.4","description":"Simple express server for static file delivering","main":"3w.js","repository":{"type":"git","url":"https://github.com/mehranhatami/3w.git"},"keywords":["server","static"],"author":{"name":"Mehran Hatami","email":"mehranhatamie@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/mehranhatami/3w/issues"},"homepage":"https://github.com/mehranhatami/3w","dependencies":{"body-parser":"^1.10.0","cookie-parser":"^1.3.3","express":"^4.10.6","morgan":"^1.5.0"},"gitHead":"bfee689b5b552856874445402ae9a0fb40f6f434","_id":"3w@0.0.4","scripts":{},"_shasum":"1c6b690528eef509c5c847e0ddd20a131e4d8986","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"mehranhatami","email":"mehranhatamie@gmail.com"},"maintainers":[{"name":"mehranhatami","email":"mehranhatamie@gmail.com"}],"dist":{"shasum":"1c6b690528eef509c5c847e0ddd20a131e4d8986","tarball":"https://registry.npmjs.org/3w/-/3w-0.0.4.tgz","integrity":"sha512-q/ZC6tCN2tDVQ50laNQy3LKoe7vSpmrQMcnXfHq4S0O0MEtaE0zxWFvHHPcTYR3eaCU8vafQHKctfD+98iSU8Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFpNqu2J71VZQS8c9xOqrT2g2kPGLJtxRzbg4pmzbO9ZAiEAq6QR4/DlwgBpj7B0JtZ5tI8CduFsbmK6jv/OSSBgR5s="}]}}},"readme":"#3w\n\nSimple express server for static file delivering.\nWhen it comes to setting up a simple Http server to expose a specific dir, we have bunch of options.\nOne of the usual way of doing that which has a tone of restrictions, is using `python` like:\n\n```\npython -m SimpleHTTPServer 8080\n```\n\nwhich allows me to expose the current dir as a http server on the specific port number.\nI created **3w** as an alternative with bunch of advanced features.\nBeing able to set up http proxies is one of the useful features which saves a lot of pain when developing a web application.\nHttp proxies are not provided in the current version but they will be soon with a nice and useful way of setting up the configuration.\n\n##Installation\n3w is now on npm, to install it all you need is to run this on terminal:\n\n```\nnpm install 3w\n```\n\nNow to run a server and expose a directory (let's say its name is `src`) all you should do is:\n\n```\nnode node_modules/3w/3w.js src --3000\n```\n\nTo enable https you could also pass `--https` which usually needs you to have `sudo` access on the machine:\n\n```\nsudo node node_modules/3w/3w.js src --3000 --https\n```\n\n##API\nYou could also `require` 3w as a module, and set up the server like:\n\n```javascript\nvar www = require('3w'),\n  app;\n\napp = www({\n  enableHTTPS: true,\n  port: 8888,\n  dir: 'src'\n});\n```\n\nor:\n\n```javascript\n//This will expose the 'app' folder and 'enableHTTPS' will be false\napp = www({\n  port: 8888\n});\n```\nor:\n\n```javascript\n//This will expose the 'src' folder on '9000' and 'enableHTTPS' will be false\napp = www({\n  dir: 'src'\n});\n```\n\nor:\n\n```javascript\n//This will expose the 'app' folder on '9000' and 'enableHTTPS' will be false\napp = www();\n```\nUsing `3w` you could also tweak the `app` object to set up your `http-proxies` like:\n\n```javascript\nvar www = require('3w'),\n  app;\n\nfunction proxy(app){\n  //...\n}\n\napp = www({\n  enableHTTPS: true,\n  port: 8888,\n  dir: 'src',\n  proxy: proxy\n});\n```\n","maintainers":[{"name":"mehranhatami","email":"mehranhatamie@gmail.com"}],"time":{"modified":"2022-06-12T14:07:33.846Z","created":"2014-12-27T22:12:29.261Z","0.0.1":"2014-12-27T22:12:29.261Z","0.0.2":"2014-12-27T22:51:27.389Z","0.0.3":"2014-12-28T00:08:37.051Z","0.0.31":"2014-12-28T00:19:50.868Z","0.0.4":"2014-12-28T00:47:02.654Z"},"homepage":"https://github.com/mehranhatami/3w","keywords":["server","static"],"repository":{"type":"git","url":"https://github.com/mehranhatami/3w.git"},"author":{"name":"Mehran Hatami","email":"mehranhatamie@gmail.com"},"bugs":{"url":"https://github.com/mehranhatami/3w/issues"},"license":"MIT","readmeFilename":"README.md","users":{"mehranhatami":true}}