{"id":23120491,"url":"https://github.com/typescriptlibs/svr","last_synced_at":"2025-04-04T03:15:36.161Z","repository":{"id":170627018,"uuid":"646082663","full_name":"typescriptlibs/svr","owner":"typescriptlibs","description":"Simple HTTP(S) Server","archived":false,"fork":false,"pushed_at":"2023-06-26T22:15:43.000Z","size":109,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-09T23:16:13.515Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://typescriptlibs.org/svr/","language":"TypeScript","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/typescriptlibs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-27T08:19:58.000Z","updated_at":"2023-06-25T09:06:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"e2c3efc8-a64c-4017-9904-893a61d5e459","html_url":"https://github.com/typescriptlibs/svr","commit_stats":null,"previous_names":["typescriptlibs/svr"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typescriptlibs%2Fsvr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typescriptlibs%2Fsvr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typescriptlibs%2Fsvr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typescriptlibs%2Fsvr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/typescriptlibs","download_url":"https://codeload.github.com/typescriptlibs/svr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247112767,"owners_count":20885606,"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-12-17T06:11:12.861Z","updated_at":"2025-04-04T03:15:36.140Z","avatar_url":"https://github.com/typescriptlibs.png","language":"TypeScript","readme":"Svr: Simple HTTP(S) Server\n==========================\n\nThis package provides a simple HTTP(S) server to deliver HTML, TypeScript, and\nother files to web browsers.\n\n\n\n[![CodeQL](https://github.com/typescriptlibs/svr/workflows/CodeQL/badge.svg)](https://github.com/typescriptlibs/svr/actions/workflows/codeql.yml)\n[![Node.js](https://github.com/typescriptlibs/svr/workflows/Node.js/badge.svg)](https://github.com/typescriptlibs/svr/actions/workflows/node.js.yml)\n[![NPM](https://img.shields.io/npm/v/@typescriptlibs/svr.svg)](https://www.npmjs.com/package/@typescriptlibs/svr)\n[![License](https://img.shields.io/npm/l/@typescriptlibs/svr.svg)](https://github.com/typescriptlibs/svr/blob/main/LICENSE.md)\n\n\n\nExamples\n--------\n\n- Start a HTTPS server with `html` folder as the website's root:\n\n  ``` Shell\n  npx svr --https --root html\n  ```\n\n- Start a HTTP server with log files:\n\n  ``` Shell\n  npx svr 1\u003e\u003e svr.log 2\u003e\u003e svr-error.log\n  ```\n\n\n\nOptions\n-------\n\nAll options are optional.\n\n- `--cgi [path]`:       Activates CGI path for web browsers.\n\n- `--http [port]`:      Activates HTTP port. Port number is optional.\n\n- `--https [port]`:     Activates HTTPS port. Port number is optional. Without\n                        httpsCert and httpsKey a sels-signed certificate will be\n                        created instead (requires OpenSSL).\n\n- `--httpsCert [file]`: File path to the HTTPS certificate.\n\n- `--httpsKey [file]`:  File path to the HTTPS key.\n\n- `--root [folder]`:    Root folder with files for web browsers.\n\n- `--stop [seconds]`:   Stops the server after the given amount of seconds.\n\n\n\nRedirect Output\n---------------\n\nThe following patterns follow last.\n\n- `1\u003e [file]`:  Redirect request log to a file. Replaces an existing file.\n\n- `1\u003e\u003e [file]`: Redirect request log to a file. Append to existing file.\n\n- `2\u003e [file]`:  Redirect error log to a file. Replaces an existing file.\n\n- `2\u003e\u003e [file]`: Redirect error log to a file. Append to existing file.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypescriptlibs%2Fsvr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftypescriptlibs%2Fsvr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypescriptlibs%2Fsvr/lists"}