{"id":20160760,"url":"https://github.com/debdut/golive","last_synced_at":"2025-04-10T00:11:23.416Z","repository":{"id":253973906,"uuid":"845097865","full_name":"Debdut/golive","owner":"Debdut","description":"golive is a lightweight and improved live-server alternative written in Go","archived":false,"fork":false,"pushed_at":"2024-09-13T15:15:17.000Z","size":15025,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T00:11:17.589Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Debdut.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":"2024-08-20T15:19:15.000Z","updated_at":"2024-12-08T07:50:58.000Z","dependencies_parsed_at":"2024-08-20T17:56:08.285Z","dependency_job_id":"39b8ee2b-7cbe-4f03-aa52-93811deb7e24","html_url":"https://github.com/Debdut/golive","commit_stats":null,"previous_names":["debdut/golive"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Debdut%2Fgolive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Debdut%2Fgolive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Debdut%2Fgolive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Debdut%2Fgolive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Debdut","download_url":"https://codeload.github.com/Debdut/golive/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248131316,"owners_count":21052819,"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-11-14T00:15:45.011Z","updated_at":"2025-04-10T00:11:23.389Z","avatar_url":"https://github.com/Debdut.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# golive\n\ngolive is a lightweight and improved `live-server` alternative written in Go. It allows you to serve a directory and its subpaths over HTTP or HTTPS with ease. Can be used for local web development, production static-site serving, or as a network file host.\n\n---\n\n![Screen Recording](assets/golive.gif)\n\n## Installation\n\n1. Make sure you have Go installed on your system.\n2. Make sure you've the `$GOPATH/bin` directory added to your system's PATH.\n2. Run the following command to install golive:\n\n   ```\n   go install github.com/debdut/golive\n   ```\n\nAlternatively, you can download the binary from [releases](https://github.com/Debdut/golive/releases) and use it.\n\n## Usage\n\nTo serve the current directory on the default port (80):\n\n```\ngolive\n```\n\nTo serve a specific directory on a custom port:\n\n```\ngolive -d /path/to/directory -p 8080\n```\n\nTo enable browser caching:\n\n```\ngolive -c\n```\n\nTo start in server mode on port 80 and suppress browser opening:\n\n```\ngolive -s\n```\n\nTo serve over HTTPS with a custom port and SSL certificate:\n\n```\ngolive -https-port 8443 -cert /path/to/cert.pem -key /path/to/key.pem\n```\n\nFor more options and information, run:\n\n```\ngolive -h\n```\n\n## Command-line Options\n\ngolive supports the following command-line options:\n\n- `-q`, `--quiet`: Stops golive from opening the browser when started.\n- `-c`, `--cache`: Allows browser caching of pages. Can lead to stale results, off by default.\n- `-p`, `--port`: Sets the port to serve on (default: 80).\n- `-v`, `--version`: Prints the version of golive.\n- `-d`, `--dir`: Selects the directory you want to serve. Serves all subpaths that the user has read permissions for (default: ./).\n- `-s`, `--serve`: Starts in server mode on port 80 and in quiet mode.\n- `--https-port`: Sets the HTTPS port to serve on.\n- `--cert`: Specifies the path to the SSL certificate file.\n- `--key`: Specifies the path to the SSL key file.\n- `-H`, `--headers`: Comma-separated list of custom headers to add (e.g., 'X-Custom-Header:value,Another-Header:another_value').\n\nFor more information and examples, run:\n\n```\ngolive -h\n```\n\n## Credits\n\ngolive was inspired by and built upon the boilerplate code from [go-live](https://github.com/antsankov/go-live) by Anton Sankov. The original project provided a nice basic HTTP server, but I needed additional features like live reload and HTTPS support. Implementing these features required significant modifications and 4x expansion of the original codebase. I forked because I wanted to take it in a new direction that fit's my purpose.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdebdut%2Fgolive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdebdut%2Fgolive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdebdut%2Fgolive/lists"}