{"id":22944551,"url":"https://github.com/erf/ufilecache","last_synced_at":"2025-04-01T21:29:41.546Z","repository":{"id":265841382,"uuid":"803309971","full_name":"erf/uFileCache","owner":"erf","description":"A minimal static file cache handler for uWebSocket.js","archived":false,"fork":false,"pushed_at":"2024-05-21T22:18:34.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T06:36:33.482Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-05-20T13:31:11.000Z","updated_at":"2024-05-21T22:18:38.000Z","dependencies_parsed_at":"2024-12-02T01:03:03.897Z","dependency_job_id":null,"html_url":"https://github.com/erf/uFileCache","commit_stats":null,"previous_names":["erf/ufilecache"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erf%2FuFileCache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erf%2FuFileCache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erf%2FuFileCache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erf%2FuFileCache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erf","download_url":"https://codeload.github.com/erf/uFileCache/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246712773,"owners_count":20821789,"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-14T14:19:12.754Z","updated_at":"2025-04-01T21:29:41.523Z","avatar_url":"https://github.com/erf.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# uFileCache\n\nA minimal static file cache handler for [uWebSocket.js](https://github.com/uNetworking/uWebSockets.js)\n\n\u003e NOTE: Only for small files.\n\n## Installation\n\nAdd the following to your `package.json` file:\n\n```json\n{\n  \"dependencies\": {\n\t\"uFileCache\": \"github:erf/uFileCache\"\n  }\n}\n```\n\nThen run `npm install`.\n\n## Usage\n\n```javascript\n\n// import the modules \nimport uWS from 'uWebSockets.js'\nimport FileCache from 'uFileCache'\n\nconst fileCache = new FileCache()\n\n// load files in folder to memory\nfileCache.init('public')\n\n// create a new app\nconst app = uWS.App()\n\n// index.html\napp.get('/', (res, req) =\u003e fileCache.send('./public/index.html', res))\n\n// static files\napp.get('/*', (res, req) =\u003e fileCache.send(`./public${req.getUrl()}`, res))\n```\n\n## Test\n\n```\nnode --test --no-warnings=ExperimentalWarning\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferf%2Fufilecache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferf%2Fufilecache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferf%2Fufilecache/lists"}