{"id":13472427,"url":"https://github.com/codeskyblue/gohttp","last_synced_at":"2025-03-26T15:32:14.254Z","repository":{"id":27133175,"uuid":"30601710","full_name":"codeskyblue/gohttp","owner":"codeskyblue","description":"HTTP file server written by golang + reactjs, not maintained,  move to https://github.com/codeskyblue/gohttpserver","archived":true,"fork":false,"pushed_at":"2016-07-31T02:27:57.000Z","size":2798,"stargazers_count":240,"open_issues_count":2,"forks_count":57,"subscribers_count":27,"default_branch":"master","last_synced_at":"2024-11-16T06:42:56.119Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codeskyblue.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-10T16:31:34.000Z","updated_at":"2024-01-21T06:16:46.000Z","dependencies_parsed_at":"2022-09-01T00:01:27.001Z","dependency_job_id":null,"html_url":"https://github.com/codeskyblue/gohttp","commit_stats":null,"previous_names":["codeskyblue/file-server"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeskyblue%2Fgohttp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeskyblue%2Fgohttp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeskyblue%2Fgohttp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeskyblue%2Fgohttp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeskyblue","download_url":"https://codeload.github.com/codeskyblue/gohttp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245681462,"owners_count":20655202,"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-07-31T16:00:54.548Z","updated_at":"2025-03-26T15:32:13.257Z","avatar_url":"https://github.com/codeskyblue.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# gohttp\nA http file server written by golang and reactjs.\n\n# Not maintained any more. Move to \u003chttps://github.com/codeskyblue/gohttpserver\u003e\n\n\u003cdel\u003eBinary can be download from [gobuild.io](https://gobuild.io/codeskyblue/gohttp)\u003c/del\u003e\n\n## Usage\n```\n# basic usage\ngohttp --port 8000 --root /your/workdir\n\nUsage: gohttp [\u003cflags\u003e]\n\nFlags:\n  -h, --help               Show context-sensitive help (also try --help-long and --help-man).\n      --version            Show application version.\n      --port=8000          Port to listen\n      --root=\".\"           File root directory\n      --private            Only listen on loopback address\n      --httpauth=HTTPAUTH  HTTP basic auth (ex: user:pass)\n      --cert=CERT          TLS cert.pem\n      --key=KEY            TLS key.pem\n      --gzip               Enable Gzip support\n      --upload             Enable upload support\n      --zipable            Enable archieve folder into zip\n```\n\n## Warning\nftp feature has a serious cpu usage problem. Be careful with that.\n\nThere are python scripts of which use `pyftpdlib` can do ftp server job.\n\n\n![screenshot](images/screenshot1.png)\n![screenshot](images/screenshot2.png)\n\n## Features\n1. Support QRCode code generate\n1. All assets package to Standalone binary\n1. Different file type different icon\n1. Support show or hide hidden files\n1. Upload support\n1. README.md preview\n1. HTTP Basic Auth\n1. Gzip support\n1. When only one dir under dir, path will combine two together\n1. Directory zip download\n1. Code preview\n1. Apple ipa auto generate .plist file, qrcode can be recognized by iphone (Require https)\n1. Add ftp support(beta)\n1. Support modify the index page\n1. Download count statistics\n1. CORS enabled\n\nAbout **https**\n\nThere is a [Chinese doc about how to set up nginx and generate self signed keys](docs/CA_NGINX.md)\n\nIf there is a directory `templates` exists. The program will use templates under this dir instead use html resource inside the binary file.\n\n## Build\nSuggest install node through [nvm](https://github.com/creationix/nvm)\n\n\tgo get -u github.com/jteeuwen/go-bindata/...\n\tnpm install -g webpack\n\tnpm install\n\tmake prod\n\n### Develop\nYour need to know what is react, and golang.\nIn develop mode, Support react hot reload\n\n\tnpm install\n\tmake dev\n\nOpen another terminal\n\n\tgo build \u0026\u0026 ./gohttp\n\n### API\nUpload\n\n`POST /upload-dir`\n\n*upload-dir* is just a name which you can change it easily.\n\nField name | Description | Example\n-----------|-------------|--------\nfile       | Upload file | file=@upload.txt\npath       | Upload path(optional) | path=/tmp/\nname       | Save name (optional, need version set)  | name=foo\nversion    | Upload version | version=1.2.0\n\nUse CURL\n\n\t# Normal upload\n\tcurl -F file=@upload.txt ${SERVER}\n\n\t# Versioned upload\n\tcurl -F file=@foo-windows.txt -F file=@foo-mac.txt -F name=foo -F version=1.0.1 ${SERVER}\n\n\t# will create dir structure\n\tfoo/\n\t  |- foo-latest(symlink) -\u003e foo-1.0.1\n\t  `- foo-1.0.1/\n\t      |- foo-windows.txt\n\t      `- foo-mac.txt\n\n## Thanks\n1. \u003chttps://github.com/shenfeng/http-watcher\u003e\n2. \u003chttp://segmentfault.com/a/1190000002551952\u003e\n3. [update package.json dependencies](http://stackoverflow.com/questions/16073603/how-do-i-update-each-dependency-in-package-json-to-the-latest-version)\n4. [react hot reload QA](https://github.com/gaearon/react-hot-loader/blob/master/docs/Troubleshooting.md)\n5. \u003chttps://github.com/evilstreak/markdown-js\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeskyblue%2Fgohttp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeskyblue%2Fgohttp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeskyblue%2Fgohttp/lists"}