{"id":20470987,"url":"https://github.com/lwsjs/static","last_synced_at":"2025-04-13T10:58:06.061Z","repository":{"id":60775095,"uuid":"62010347","full_name":"lwsjs/static","owner":"lwsjs","description":"Middleware for lws to serve static files.","archived":false,"fork":false,"pushed_at":"2024-08-01T08:41:54.000Z","size":136,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T02:11:53.359Z","etag":null,"topics":["backend","lws","lws-middleware","webserver"],"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/lwsjs.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":"2016-06-26T22:03:53.000Z","updated_at":"2025-01-07T13:19:08.000Z","dependencies_parsed_at":"2024-08-01T10:00:49.375Z","dependency_job_id":"c5c10bb0-9ed9-411f-862e-713fb24f18e5","html_url":"https://github.com/lwsjs/static","commit_stats":{"total_commits":51,"total_committers":1,"mean_commits":51.0,"dds":0.0,"last_synced_commit":"1744c580a9fec9bedea0a9194fae1eb6d7b09299"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lwsjs%2Fstatic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lwsjs%2Fstatic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lwsjs%2Fstatic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lwsjs%2Fstatic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lwsjs","download_url":"https://codeload.github.com/lwsjs/static/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248298351,"owners_count":21080320,"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":["backend","lws","lws-middleware","webserver"],"created_at":"2024-11-15T14:14:31.600Z","updated_at":"2025-04-13T10:58:06.038Z","avatar_url":"https://github.com/lwsjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![view on npm](https://badgen.net/npm/v/lws-static)](https://www.npmjs.org/package/lws-static)\n[![npm module downloads](https://badgen.net/npm/dt/lws-static)](https://www.npmjs.org/package/lws-static)\n[![Gihub repo dependents](https://badgen.net/github/dependents-repo/lwsjs/static)](https://github.com/lwsjs/static/network/dependents?dependent_type=REPOSITORY)\n[![Gihub package dependents](https://badgen.net/github/dependents-pkg/lwsjs/static)](https://github.com/lwsjs/static/network/dependents?dependent_type=PACKAGE)\n[![Node.js CI](https://github.com/lwsjs/static/actions/workflows/node.js.yml/badge.svg)](https://github.com/lwsjs/static/actions/workflows/node.js.yml)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](https://github.com/feross/standard)\n\n# lws-static\n\nLws middleware plugin to serve static files, wraps [koa-static](https://github.com/koajs/static). See [here](https://github.com/lwsjs/local-web-server/wiki/How-to-serve-static-files) for usage instrutions.\n\nAdds the following options to `lws`.\n\n\u003cpre\u003e\u003ccode\u003e\n--directory, -d \u003cu\u003epath\u003c/u\u003e           Root directory, defaults to the current directory.\n--static.maxage \u003cu\u003enumber\u003c/u\u003e         Cache max-age (in seconds) applied to all resources served.\n--static.defer                 If true, serves after `await next`, allowing any downstream middleware to\n                               respond first.\n--static.index \u003cu\u003epath\u003c/u\u003e            Default file name, defaults to `index.html`.\n--static.extensions \u003cu\u003eext\u003c/u\u003e        One or more default filename extensions. For example, if you set\n                               `--static.extensions html` and request `/page` then the server will look for\n                               both `page` and `page.html` on disk, serving the latter.\n\u003c/pre\u003e\u003c/code\u003e\n\n* * *\n\n\u0026copy; 2016-24 Lloyd Brookes \\\u003c75pound@gmail.com\\\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flwsjs%2Fstatic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flwsjs%2Fstatic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flwsjs%2Fstatic/lists"}