{"id":24591995,"url":"https://github.com/mrozio13pl/serw","last_synced_at":"2025-03-18T02:44:31.584Z","repository":{"id":230978936,"uuid":"780510996","full_name":"mrozio13pl/serw","owner":"mrozio13pl","description":"Serve static files with ease. 🎆","archived":false,"fork":false,"pushed_at":"2024-04-01T22:06:57.000Z","size":63,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-13T09:40:13.066Z","etag":null,"topics":["files","http","serve","server","static"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/serw","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/mrozio13pl.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","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}},"created_at":"2024-04-01T16:27:15.000Z","updated_at":"2024-09-04T08:15:00.000Z","dependencies_parsed_at":"2024-04-01T23:24:26.992Z","dependency_job_id":"ac6d5128-3a85-4fc4-a9c0-9bfe5fc10ffa","html_url":"https://github.com/mrozio13pl/serw","commit_stats":null,"previous_names":["mrozio13pl/serw"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrozio13pl%2Fserw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrozio13pl%2Fserw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrozio13pl%2Fserw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrozio13pl%2Fserw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrozio13pl","download_url":"https://codeload.github.com/mrozio13pl/serw/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244147216,"owners_count":20405940,"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":["files","http","serve","server","static"],"created_at":"2025-01-24T10:13:23.653Z","updated_at":"2025-03-18T02:44:31.553Z","avatar_url":"https://github.com/mrozio13pl.png","language":"TypeScript","readme":"# serw 🥽 [![npm][version]][package] \u003cimg src=\"./assets/logo.png\" width=\"40%\" align=\"right\" alt=\"serw\"\u003e\n\nServe static files with ease. 🎆\n\n## Getting Started\n\nEasiest way to get started is by just typing `npx serw` which will start a static HTTP server from your current directory.\n\n\u003cimg src=\"./assets/screenshot.png\" alt=\"example\"\u003e\n\n\u003e ⚠ By default serw will attempt to find `public` directory and serve files from there. To avoid this behavior type `serw .`.\n\nAlternatively, you can manually install the package globally:\n\n```bash\nnpm i serw --global\n```\n\n...and then run it in your project's directory:\n\n```bash\nserw folder-name/ [options]\n```\n\n## Features\n\n* 🛡️ Integration with SSL/TLS certificate.\n* 🌐 ETag, CORS, Cache-Control headers.\n* 🔒 Basic password authentication.\n* 📁 Ignore files with support for globs.\n* 🚨 Customizable HTTP error handlers\n\n## Configuration\n\nTo show a full list of available options run `serw --help`.\\\nEvery option can be negated with `--no` prefix, e.g. `--no-open` or `-o=false`.\n\n\u003e 💡 You can also configure serw with `serw.json` file.\n\nFor now this package is only a CLI tool and has no built-in programmatic integration yet. I recommend against using `serw` in production and only using it in development.\n\n## Options\n\n### `--host, -H`\n\nType: `string`\\\nDefault: `localhost`\n\nHostname to bind.\n\n### `--port, -p`\n\nType: `number`\\\nDefault: `3000`\n\nPort to bind.\n\n### `--index, -m`\n\nType: `string`\\\nDefault: `index.html`\n\nPath to the main page file.\n\n### `--dot-files, -d`\n\nType: `boolean`\\\nDefault: `false`\n\nShow dot files, e.g. `.env`.\n\n### `--ignore-files, -i`\n\nType: `array`\n\nList of files to ignore.\n\n### `--dir-listing, -l`\n\nType: `boolean`\\\nDefault: `true`\n\nEnable directory listing.\n\u003cdetails\u003e\n    \u003csummary\u003eClick to show an example.\u003c/summary\u003e\n    \u003cimg src=\"./assets/screenshot.png\" alt=\"example\" /\u003e\n\u003c/details\u003e\n\n### `--error-page, -E`\n\nType: `string`\\\nDefault: `404.html`\n\nPath to a file to display when an error occurred.\n\n### `--open, -o`\n\nType: `boolean`\\\nDefault: `true`\n\nWhether to open browser window after the server starts.\n\n### `--robots, -r`\n\nType: `boolean`\\\nDefault: `false`\n\nAutomatically handle [`/robots.txt`](https://en.wikipedia.org/wiki/Robots.txt).\n\n### `--cors, -c`\n\nType: `boolean`\\\nDefault: `false`\n\nEnable CORS headers.\n\n### `--etag, -e`\n\nType: `boolean`\\\nDefault: `false`\n\nEnable ETag headers.\n\n### `--max-age, -M`\n\nType: `number`\\\nDefault: `undefined`\n\nEnable Cache-Control header and set `maxAge` (seconds).\n\n### `--immutable, -I`\n\nType: `boolean`\\\nDefault: `false`\n\nAppends Cache-Control header with `immutable`.\n\n### `--password, -p`\n\nType: `string`\n\nEnable simple authentication via a password.\n\n### `--ssl, -s`\n\nType: `boolean`\\\nDefault: `false`\n\nEnable SSL/TLS for HTTPS.\n\n### `--key, -K`\n\nType: `string`\\\nDefault: `key.pem`\n\nPath to SSL certificate key.\n\n### `--cert, -C`\n\nType: `string`\\\nDefault: `cert.pem`\n\nPath to SSL certificate file.\n\n### `--config`\n\nType: `string`\\\nDefault: `serw.json`\n\nPath to the config json file.\n\n### `--log-ip`\n\nType: `boolean`\\\nDefault: `false`\n\nLog IP address of the client's request.\n\n### `--log-agent`\n\nType: `boolean`\\\nDefault: `false`\n\nLog User-agent of the client's request.\n\n### `--log-timestamp`\n\nType: `boolean`\\\nDefault: `true`\n\nLog timestamp.\n\n### `--clear-console`\n\nType: `boolean`\\\nDefault: `true`\n\nClear console after the server starts.\n\n### `--silent`\n\nType: `boolean`\\\nDefault: `false`\n\nDisable logging entirely.\n\n## License\n\nMIT 💖\n\n\u003c!-- badges --\u003e\n[package]: https://npmjs.com/package/serw\n[version]: https://img.shields.io/npm/v/serw?color=0094FF\u0026label=","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrozio13pl%2Fserw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrozio13pl%2Fserw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrozio13pl%2Fserw/lists"}