{"id":19768332,"url":"https://github.com/roxiness/spassr","last_synced_at":"2025-08-04T06:14:34.801Z","repository":{"id":52653173,"uuid":"253503065","full_name":"roxiness/spassr","owner":"roxiness","description":null,"archived":false,"fork":false,"pushed_at":"2021-07-07T11:39:14.000Z","size":260,"stargazers_count":32,"open_issues_count":0,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-21T10:54:25.574Z","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/roxiness.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}},"created_at":"2020-04-06T13:17:06.000Z","updated_at":"2023-09-23T08:45:30.000Z","dependencies_parsed_at":"2022-08-22T00:01:04.871Z","dependency_job_id":null,"html_url":"https://github.com/roxiness/spassr","commit_stats":null,"previous_names":["sveltech/spassr"],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roxiness%2Fspassr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roxiness%2Fspassr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roxiness%2Fspassr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roxiness%2Fspassr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roxiness","download_url":"https://codeload.github.com/roxiness/spassr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251742826,"owners_count":21636517,"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-12T04:37:21.573Z","updated_at":"2025-04-30T16:34:10.576Z","avatar_url":"https://github.com/roxiness.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"spassr.png\" alt=\"routify\" width=\"400\" /\u003e\u003cbr\u003e\n\u003c/div\u003e\n\n### Small Express server with SSR\n\n#### Usage example\n\n    $ npx spassr --assets-dir dist --entrypoint dist/index.html --script dist/build/bundle.js --ssr\n\n#### Configuration\n\nSpassr can be configured through `CLI`, `package.json`, `spassr.config.js` and `.env`.\n\nEnvironment variables are converted from snake_case to camelCase, so `SPASSR_assets_dir = dist` becomes `{... assetsDir: 'dist'}`\n\nFor configuration options, refer to the API below.\n\n* * *\n\n### API\n\n\u003c!-- Generated by documentation.js. Update this documentation by updating the source code. --\u003e\n\n##### Table of Contents\n\n-   [spassr](#spassr)\n    -   [Parameters](#parameters)\n-   [Config](#config)\n    -   [Properties](#properties)\n-   [Eval](#eval)\n    -   [Parameters](#parameters-1)\n-   [config](#config-1)\n\n#### spassr\n\n##### Parameters\n\n-   `options` **Partial\u0026lt;config.Config\u003e** \\*\n\n#### Config\n\nType: [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)\n\n##### Properties\n\n-   `assetsDir` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \\| [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)\u0026lt;[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)\u003e)** folders with static content to be served.\n-   `entrypoint` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** HTML template, eg. assets/index.html.\n-   `script` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** path to app, eg. build/bundle.js.\n-   `port` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) \\| [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number))** port to serve on.\n-   `ssr` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** enable SSR for routes not resolved in assetsDir.\n-   `silent` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** quiet console.log.\n-   `middleware` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function)** function to customize SPA server (\u003csmall\u003e_Not available in CLI_\u003c/small\u003e).\n-   `ssrOptions` **Partial\u0026lt;tossr.Config\u003e** options to pass to ssr.\n\n\n#### Eval\n\nCalled before/after the app script is evaluated\n\nType: [Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)\n\n##### Parameters\n\n-   `dom` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** The DOM object\n\n#### config\n\nType: [Config](#config)\n\n\n---\n\n\u003ca href=\"https://www.freepik.com/vectors/business\"\u003eBusiness vector created by teravector - www.freepik.com\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froxiness%2Fspassr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froxiness%2Fspassr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froxiness%2Fspassr/lists"}