{"id":13527420,"url":"https://github.com/JacksonTian/anywhere","last_synced_at":"2025-04-01T09:31:30.342Z","repository":{"id":5064941,"uuid":"6226806","full_name":"JacksonTian/anywhere","owner":"JacksonTian","description":"Running static file server anywhere / 随启随用的静态文件服务器","archived":false,"fork":false,"pushed_at":"2024-12-09T08:29:59.000Z","size":224,"stargazers_count":1020,"open_issues_count":11,"forks_count":175,"subscribers_count":32,"default_branch":"master","last_synced_at":"2025-03-27T12:05:59.083Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"apenwarr/git-subtree","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JacksonTian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-License","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-10-15T12:48:43.000Z","updated_at":"2025-03-24T01:30:23.000Z","dependencies_parsed_at":"2024-01-17T04:45:02.544Z","dependency_job_id":"8cc5f388-832b-438a-aad6-f35c267fd799","html_url":"https://github.com/JacksonTian/anywhere","commit_stats":{"total_commits":50,"total_committers":10,"mean_commits":5.0,"dds":"0.31999999999999995","last_synced_commit":"39f174f554b0fcc32552504c67b73c87ed5200f4"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacksonTian%2Fanywhere","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacksonTian%2Fanywhere/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacksonTian%2Fanywhere/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JacksonTian%2Fanywhere/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JacksonTian","download_url":"https://codeload.github.com/JacksonTian/anywhere/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246616121,"owners_count":20806062,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T06:01:47.631Z","updated_at":"2025-04-01T09:31:30.337Z","avatar_url":"https://github.com/JacksonTian.png","language":"JavaScript","funding_links":[],"categories":["Repository","JavaScript"],"sub_categories":["HTTP"],"readme":"Anywhere 随启随用的静态文件服务器\n==============================\n\n![NPM Version](https://img.shields.io/npm/v/anywhere)\n![NPM Downloads](https://img.shields.io/npm/dm/anywhere)\n\nRunning static file server anywhere. 随时随地将你的当前目录变成一个静态文件服务器的根目录。\n\n## Installation\n\nInstall it as a command line tool via `npm -g`.\n\n```sh\nnpm install anywhere -g\n```\n\n## Execution\n\n```sh\n$ anywhere\n// or with port\n$ anywhere -p 8000\n// or start it but silent(don't open browser)\n$ anywhere -s\n// or with hostname\n$ anywhere -h localhost -p 8888\n// or with folder\n$ anywhere -d ~/git/anywhere\n// or enable html5 history\n$ anywhere -f /index.html\n```\n\n## Help\n\n```sh\n$ anywhere --help\nUsage:\n  anywhere --help // print help information\n  anywhere // 8000 as default port, current folder as root\n  anywhere 8888 // 8888 as port\n  anywhere -p 8989 // 8989 as port\n  anywhere -s // don't open browser\n  anywhere -h localhost // localhost as hostname\n  anywhere -d /home // /home as root\n  anywhere -f /index.html  // Enable html5 history,the index is /index.html\n  anywhere --proxy http://localhost:7000/api // Support shorthand URL, webpack.config.js or customize config file\n```\n\n#### Proxy argvs\n\n**Shorthand URL**\n```\nanywhere --proxy http://localhost:7000/api\n                 \\___________________/\\___/\n                              |         |\n                           target    context\n```\nMore about the [shorthand configuration](https://github.com/chimurai/http-proxy-middleware#shorthand).\n\n**Webpack config**\n```javascript\n// webpack.config.js\nmodule.exports = {\n  devServer: {\n    proxy: {\n      '/api': {\n        target: 'http://localhost:7000',\n        changeOrigin: true\n      }\n    }\n  }\n}\n```\n\n**Customize config**\n```javascript\n// proxy.config.js\nmodule.exports = {\n  '/api': {\n    target: 'http://localhost:7000',\n    changeOrigin: true\n  }\n}\n```\nMore proxy [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware#context-matching) help.\n\n## Visit\n\n```\nhttp://localhost:8000\n```\nAutomatically open default browser. 执行命令后，默认浏览器将为您自动打开主页。\n\n## License\nThe MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJacksonTian%2Fanywhere","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJacksonTian%2Fanywhere","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJacksonTian%2Fanywhere/lists"}