{"_id":"@dovahkiin/anywhere","name":"@dovahkiin/anywhere","dist-tags":{"latest":"1.6.1"},"versions":{"1.6.1":{"name":"@dovahkiin/anywhere","version":"1.6.1","description":"Run static file server anywhere","bin":{"anywhere":"bin/anywhere"},"keywords":["Static","file","server","Assets"],"author":{"name":"Jackson Tian"},"license":"MIT","dependencies":{"connect":"^3.6.6","connect-history-api-fallback":"^1.2.0","debug":"^4.3.4","http-proxy-middleware":"^0.19.1","mime-types":"^2.1.35","minimist":"^1.2.0","serve-index":"^1.9.1","serve-static":"^1.13.2"},"repository":{"type":"git","url":"git://github.com/JacksonTian/anywhere.git"},"bugs":{"url":"https://github.com/JacksonTian/anywhere/issues"},"homepage":"https://github.com/JacksonTian/anywhere","devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_id":"@dovahkiin/anywhere@1.6.1","gitHead":"c1bb9deee80bff48af4ec76b9621a001e1096f9d","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-gpplSheDF1uWW0etYeN0/PKuJml1jJbpo9Mm4gRiN9SirFWzmL6pZNPCcemZMAjruuaH//ojMWMBwEI9L8Km5w==","shasum":"36d85ce83c52993b9dd8ad2fbaf1141da8b6c33e","tarball":"https://registry.npmjs.org/@dovahkiin/anywhere/-/anywhere-1.6.1.tgz","fileCount":5,"unpackedSize":10799,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHTbElbT7AC97Vv2Xp9N8qcBPiAW5jmpXw07ToHfXASGAiBYQe6SgpEOKsXBc9HBD4thfbGcLDdFQ2FwgfhElWwa6Q=="}]},"_npmUser":{"name":"cure_dovahkiin","email":"git@dovahkiin.top"},"directories":{},"maintainers":[{"name":"cure_dovahkiin","email":"git@dovahkiin.top"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/anywhere_1.6.1_1731554166272_0.7693411233621454"},"_hasShrinkwrap":false}},"time":{"created":"2024-11-14T03:16:06.169Z","1.6.1":"2024-11-14T03:16:06.473Z","modified":"2024-11-14T03:16:06.760Z"},"maintainers":[{"name":"cure_dovahkiin","email":"git@dovahkiin.top"}],"description":"Run static file server anywhere","homepage":"https://github.com/JacksonTian/anywhere","keywords":["Static","file","server","Assets"],"repository":{"type":"git","url":"git://github.com/JacksonTian/anywhere.git"},"author":{"name":"Jackson Tian"},"bugs":{"url":"https://github.com/JacksonTian/anywhere/issues"},"license":"MIT","readme":"Anywhere 随启随用的静态文件服务器\r\n==============================\r\n\r\n![NPM Version](https://img.shields.io/npm/v/anywhere)\r\n![NPM Downloads](https://img.shields.io/npm/dm/anywhere)\r\n\r\nRunning static file server anywhere. 随时随地将你的当前目录变成一个静态文件服务器的根目录。\r\n\r\n## Installation\r\n\r\nInstall it as a command line tool via `npm -g`.\r\n\r\n```sh\r\nnpm install anywhere -g\r\n```\r\n\r\n## Execution\r\n\r\n```sh\r\n$ anywhere\r\n// or with port\r\n$ anywhere -p 8000\r\n// or start it but silent(don't open browser)\r\n$ anywhere -s\r\n// or with hostname\r\n$ anywhere -h localhost -p 8888\r\n// or with folder\r\n$ anywhere -d ~/git/anywhere\r\n// or enable html5 history\r\n$ anywhere -f /index.html\r\n```\r\n\r\n## Help\r\n\r\n```sh\r\n$ anywhere --help\r\nUsage:\r\n  anywhere --help // print help information\r\n  anywhere // 8000 as default port, current folder as root\r\n  anywhere 8888 // 8888 as port\r\n  anywhere -p 8989 // 8989 as port\r\n  anywhere -s // don't open browser\r\n  anywhere -h localhost // localhost as hostname\r\n  anywhere -d /home // /home as root\r\n  anywhere -f /index.html  // Enable html5 history,the index is /index.html\r\n  anywhere --proxy http://localhost:7000/api // Support shorthand URL, webpack.config.js or customize config file\r\n```\r\n\r\n#### Proxy argvs\r\n\r\n**Shorthand URL**\r\n```\r\nanywhere --proxy http://localhost:7000/api\r\n                 \\___________________/\\___/\r\n                              |         |\r\n                           target    context\r\n```\r\nMore about the [shorthand configuration](https://github.com/chimurai/http-proxy-middleware#shorthand).\r\n\r\n**Webpack config**\r\n```javascript\r\n// webpack.config.js\r\nmodule.exports = {\r\n  devServer: {\r\n    proxy: {\r\n      '/api': {\r\n        target: 'http://localhost:7000',\r\n        changeOrigin: true\r\n      }\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n**Customize config**\r\n```javascript\r\n// proxy.config.js\r\nmodule.exports = {\r\n  '/api': {\r\n    target: 'http://localhost:7000',\r\n    changeOrigin: true\r\n  }\r\n}\r\n```\r\nMore proxy [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware#context-matching) help.\r\n\r\n## Visit\r\n\r\n```\r\nhttp://localhost:8000\r\n```\r\nAutomatically open default browser. 执行命令后，默认浏览器将为您自动打开主页。\r\n\r\n## License\r\nThe MIT license.\r\n","readmeFilename":"README.md"}