{"id":16676852,"url":"https://github.com/nojaja/http-server-ui","last_synced_at":"2025-04-05T02:42:20.797Z","repository":{"id":37194507,"uuid":"251568741","full_name":"nojaja/http-server-ui","owner":"nojaja","description":"a simple zero-configuration GUI http server","archived":false,"fork":false,"pushed_at":"2023-02-03T05:30:47.000Z","size":236,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-10T11:09:52.733Z","etag":null,"topics":["electron","gui","hosting","http-server","server"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nojaja.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"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":"2020-03-31T10:19:56.000Z","updated_at":"2023-10-22T19:32:31.000Z","dependencies_parsed_at":"2023-02-05T03:46:26.436Z","dependency_job_id":null,"html_url":"https://github.com/nojaja/http-server-ui","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nojaja%2Fhttp-server-ui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nojaja%2Fhttp-server-ui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nojaja%2Fhttp-server-ui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nojaja%2Fhttp-server-ui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nojaja","download_url":"https://codeload.github.com/nojaja/http-server-ui/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247280177,"owners_count":20912965,"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":["electron","gui","hosting","http-server","server"],"created_at":"2024-10-12T13:11:47.753Z","updated_at":"2025-04-05T02:42:20.779Z","avatar_url":"https://github.com/nojaja.png","language":"JavaScript","readme":"[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/nojaja/http-server-ui) \n[![Licence](https://img.shields.io/badge/License-MIT-green.svg?style=flat-square)](LICENSE) \n\n# http-server-ui\n\n`http-server-ui`: a GUI http server that combines `http-server` and `electron`.\n\n`http-server-ui` is a simple, zero-configuration GUI http server. \nIt is powerful enough for production usage, but it's simple and hackable enough to be used for testing, \nlocal development, and learning.\n\n![screenshot](/assets/screenshots/ss02.png)\n\n## Installation\n[v0.0.1](https://github.com/nojaja/http-server-ui/releases/tag/v0.0.1)\n\n## Usage\n```\nhttp-server-ui.exe [path] [options]\n```\n`[path]` defaults to `./public` if the folder exists, and `./` otherwise.\n\nNow you can visit ___http://localhost:8080___ to view your server\n\nNote: Caching is on by default. Add `-c-1` as an option to disable caching.\n\n## Available Options\n\n`-p` or `--port` Port to use (defaults to 8080)\n\n`-a` Address to use (defaults to 0.0.0.0)\n\n`-d` Show directory listings (defaults to `true`)\n\n`-i` Display autoIndex (defaults to `true`)\n\n`-g` or `--gzip` When enabled (defaults to `false`) it will serve `./public/some-file.js.gz` in place of `./public/some-file.js` when a gzipped version of the file exists and the request accepts gzip encoding. If brotli is also enabled, it will try to serve brotli first.\n\n`-b` or `--brotli` When enabled (defaults to `false`) it will serve `./public/some-file.js.br` in place of `./public/some-file.js` when a brotli compressed version of the file exists and the request accepts `br` encoding. If gzip is also enabled, it will try to serve brotli first.\n\n`-e` or `--ext` Default file extension if none supplied (defaults to `html`)\n\n`-s` or `--silent` Suppress log messages from output\n\n`--cors` Enable CORS via the `Access-Control-Allow-Origin` header\n\n`-o [path]` Open browser window after starting the server. Optionally provide a URL path to open. e.g.: -o /other/dir/\n\n`-c` Set cache time (in seconds) for cache-control max-age header, e.g. `-c10` for 10 seconds (defaults to `3600`). To disable caching, use `-c-1`.\n\n`-U` or `--utc` Use UTC time format in log messages.\n\n`--log-ip` Enable logging of the client's IP address (default: `false`).\n\n`-P` or `--proxy` Proxies all requests which can't be resolved locally to the given url. e.g.: -P http://someurl.com\n\n`--username` Username for basic authentication [none]\n\n`--password` Password for basic authentication [none]\n\n`-S` or `--ssl` Enable https.\n\n`-C` or `--cert` Path to ssl cert file (default: `cert.pem`).\n\n`-K` or `--key` Path to ssl key file (default: `key.pem`).\n\n`-r` or `--robots` Provide a /robots.txt (whose content defaults to `User-agent: *\\nDisallow: /`)\n\n`--no-dotfiles` Do not show dotfiles\n\n`-h` or `--help` Print this list and exit.\n\n`-v` or `--version` Print the version and exit.\n\n## Magic Files\n\n- `index.html` will be served as the default file to any directory requests.\n- `404.html` will be served if a file is not found. This can be used for Single-Page App (SPA) hosting to serve the entry page.\n\n## Catch-all redirect\n\nTo implement a catch-all redirect, use the index page itself as the proxy with:\n\n```\nhttp-server --proxy http://localhost:8080?\n```\n\nNote the `?` at the end of the proxy URL. Thanks to [@houston3](https://github.com/houston3) for this clever hack!\n\n## TLS/SSL\n\nFirst, you need to make sure that [openssl](https://github.com/openssl/openssl) is installed correctly, and you have `key.pem` and `cert.pem` files. You can generate them using this command:\n\n``` sh\nopenssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem\n```\n\nYou will be prompted with a few questions after entering the command. Use `127.0.0.1` as value for `Common name` if you want to be able to install the certificate in your OS's root certificate store or browser so that it is trusted.\n\nThis generates a cert-key pair and it will be valid for 3650 days (about 10 years).\n\nThen you need to run the server with `-S` for enabling SSL and `-C` for your certificate file.\n\n``` sh\nhttp-server -S -C cert.pem\n```\n\nThis is what should be output if successful:\n\n``` sh\nStarting up http-server, serving ./ through https\nAvailable on:\n  https:127.0.0.1:8080\n  https:192.168.1.101:8080\n  https:192.168.1.104:8080\nHit CTRL-C to stop the server\n```\n## development\n```\ngit clone https://github.com/nojaja/http-server-ui.git\nnpm install\nnpm run start\n```\n\n## development-dist\n```\nnpm run dist\n```\n\n## publish\n```\ngit tag v0.0.0\ngit push --tags\n```\nstart CI ⇒ make release file\n\n## License\n\nLicensed under the [MIT](LICENSE) License.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnojaja%2Fhttp-server-ui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnojaja%2Fhttp-server-ui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnojaja%2Fhttp-server-ui/lists"}