UNPKG

@testim/testim-cli

Version:

Command line interface for running Testing on you CI

96 lines (95 loc) 5.06 kB
{ "_args": [ [ "statik", "/Users/gil/projects/testim/click-test/src/selenium" ] ], "_from": "statik@*", "_id": "statik@1.4.6", "_inCache": true, "_location": "/statik", "_npmUser": { "email": "d.hong@me.com", "name": "hongymagic" }, "_npmVersion": "1.3.14", "_phantomChildren": {}, "_requested": { "name": "statik", "raw": "statik", "rawSpec": "", "scope": null, "spec": "*", "type": "range" }, "_requiredBy": [ "/" ], "_resolved": "https://registry.npmjs.org/statik/-/statik-1.4.6.tgz", "_shasum": "8c9c3d1c7c726765f06c93d9d5f8422f1df7bbbb", "_shrinkwrap": null, "_spec": "statik", "_where": "/Users/gil/projects/testim/click-test/src/selenium", "author": { "email": "davidhong.code@gmail.com", "name": "David Hong" }, "bin": { "statik": "./bin/statik" }, "bugs": { "url": "https://github.com/hongymagic/statik/issues" }, "dependencies": { "connect": "~2.11.0", "extend": "~1.2.1", "nopt": "~2.1.2" }, "description": "Simple static file server – serve any directory over HTTP", "devDependencies": {}, "directories": {}, "dist": { "shasum": "8c9c3d1c7c726765f06c93d9d5f8422f1df7bbbb", "tarball": "http://registry.npmjs.org/statik/-/statik-1.4.6.tgz" }, "engines": { "node": "0.x.x", "npm": "1.x.x" }, "homepage": "https://hongymagic.github.com/statik", "installable": true, "keywords": [ "cdn", "developement", "file", "server", "static", "statik" ], "licenses": [ { "type": "MIT", "url": "https://github.com/hongymagic/statik/LICENSE" } ], "main": "index", "maintainers": [ { "name": "hongymagic", "email": "hongymagic@me.com" } ], "name": "statik", "optionalDependencies": {}, "readme": "# Statik\n\nA simple and easy-to-use Node.js module to server static files over HTTP. It's\nsuper simple to use it.\n\n## Command line usage\n\n```bash\n$ npm install -g statik\n$ cd ~/Sites\n$ statik\n```\n\nThen head to [http://localhost:3000/](http://localhost:3000/) to see the\ncontents of `./public` served over HTTP.\n\n### Customise the default directory and port\n\n```bash\n// Start server at http://localhost:3000 serving ./public\n$ static --port 3000\n\n// Start server at http://localhost:3000 serving ~/Sites/project\n$ statik --port 3000 ~/Sites/project\n```\n\n### Other command line options\n\n* **maxAge**: browser cache maxAge in milliseconds. Defaults to 0\n* **hidden**: allow transfer of hidden files. Defaults to false\n* **redirect**: redirect to trailing \"/\" when pathname is directory. Defaults to true\n* **compress**: enable gzip compression. Defaults to true\n* **verbose**: enable logging to stdout. Defaults to false\n\n## Use it programmatically\n\n```bash\n$ npm install statik --save\n```\n\n### Usage\n\n```javascript\n// app.js\nvar statik = require('statik');\nstatik(3000);\n```\n\nYour server will be running on [http://localhost:3000/](http://localhost:3000/)\nserving `./public` directory.\n\n### Customisations\n\nYou can specify the directory you wish to serve as an argument.\n\n```javascript\n// app.js\nvar statik = require('statik');\nstatik({\n\tport: 3000,\n\troot: '/Users/hongymagic/Sites'\n});\n```\n\nYour server will be running on [http://localhost:3000/](http://localhost:3000/)\nserver `/Users/hongymagic/sites` directory.\n\nYou can also use command line options when invoking `statik` function.\n\n## Running it on heroku\n\n```bash\n$ echo 'web: node app.js' > Procfile\n$ heroku create --stack cedar statik-app\n$ git push heroku master\n$ heroku open\n```\n\nBAM!\n\n## FAQ\n\n### Why?\n\n> Because I hate `file://` protocol for the reasons I wish not to disclose. One\nof the recent ones I've come across is [Typekit](http://help.typekit.com/customer/portal/articles/6857-using-typekit-while-developing-locally).\nAnd trust me there are other problems that pop-up if you're primarily working\nfor the `http://` protocol.\n\n### What about the HTTP Headers?\n\n> There are some default HTTP Headers that I am going to introduce for the reaons\nwhy I have create this package in the first place:\n\n> 1. Content-Type: statik uses another internal Node.js package `mime` to check\nagainst content types\n> 2. Cache-Control: 'no-cache'. The primary purpose of statik was so I could easily\nrun a folder as web server over HTTP while I'm working on a new site. Might as\nwell kill off the cache while I'm writing and debugging CSS and JavaScript. There\nwill be an option to disable to default behaviour though.\n\n### How does statik treat root `/`?\n\n> For now, it will translate that into `index.html`\n\n## TODO\n\n1. Clean up code around 404 and 500 errors\n2. Options to add/remove default HTTP headers\n3. Default set of files instead of `index.html`\n", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git://github.com/hongymagic/statik" }, "scripts": { "test": "grunt test" }, "version": "1.4.6" }