{"id":15068256,"url":"https://github.com/fabrix-app/spool-express","last_synced_at":"2026-02-18T18:02:14.778Z","repository":{"id":32684636,"uuid":"138224356","full_name":"fabrix-app/spool-express","owner":"fabrix-app","description":"Spool: Express Webserver Spool","archived":false,"fork":false,"pushed_at":"2022-12-30T17:37:31.000Z","size":2419,"stargazers_count":3,"open_issues_count":22,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-02T06:05:19.689Z","etag":null,"topics":["express","fabrix","nodejs","spools","typescript","webserver"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fabrix-app.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-21T21:38:33.000Z","updated_at":"2020-07-01T15:45:17.000Z","dependencies_parsed_at":"2023-01-14T21:55:40.468Z","dependency_job_id":null,"html_url":"https://github.com/fabrix-app/spool-express","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabrix-app%2Fspool-express","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabrix-app%2Fspool-express/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabrix-app%2Fspool-express/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabrix-app%2Fspool-express/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabrix-app","download_url":"https://codeload.github.com/fabrix-app/spool-express/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248252659,"owners_count":21072699,"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":["express","fabrix","nodejs","spools","typescript","webserver"],"created_at":"2024-09-25T01:32:50.650Z","updated_at":"2026-02-18T18:02:14.772Z","avatar_url":"https://github.com/fabrix-app.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spool-express\n:package: Express Spool\n\n[![Gitter][gitter-image]][gitter-url]\n[![NPM version][npm-image]][npm-url]\n[![Build Status][ci-image]][ci-url]\n[![Test Coverage][coverage-image]][coverage-url]\n[![Dependency Status][daviddm-image]][daviddm-url]\n[![Follow @FabrixApp on Twitter][twitter-image]][twitter-url]\n\nThis pack binds the routes compiled in [spool-router](https://github.com/fabrix-app/spool-router)\nto an [Express Server](http://expressjs.com/en/api.html). \n\n## Install\n\n```sh\n$ npm install @fabrix/spool-express --save\n```\n\n## Compatibility\n\nThis spool is compatible with Express [v4](http://expressjs.com/en/4x/api.html) and [v5](https://github.com/expressjs/express/tree/5.0).\n\n#### Express v4\n\n```\n$ npm install --save express@^4\n```\n\n#### Express v5\n\n```\n$ npm install --save express@^5.0.0-alpha.2\n```\n\n## Usage\nLoad in your spool config.\n\n```js\n// config/main.js\nmodule.exports = {\n  // ...\n  spools: [\n    require('@fabrix/spool-router').RouterSpool,\n    require('@fabrix/spool-express').ExpressSpool\n  ]\n}\n```\n\n## Static assets\n```js\n// config/main.js\nmodule.exports = {\n  // ...\n  paths: {\n    ...\n    www: path.resolve(__dirname, '..', 'public')\n    ...\n  }\n}\n```\n\n## View Config\nChoose a template engine.\n\n```js\n// config/views.js\nmodule.exports = {\n  engine: 'pug'\n}\n```\n\nThen simply write your views in a directory called 'views'!\n\n## Configuration\n\nSee [`config/web.js`](https://github.com/fabrix-app/spool-express/blob/master/archetype/config/web.js) for a full example.\n\n#### `express`\nRequire field to set express version to use by setting `express: require('express')`\n\n#### `cors`\nOptional field to configure CORS, can be a boolean or an object (see https://github.com/expressjs/cors#configuring-cors)\n\n#### `port`\nThe port to listen on. `3000` by default. Can also be set via the `PORT` environment variable.\n\n#### `host`\nThe hostname of the server.\n\n#### `cache`\nThe number of seconds to cache flat files on disk being served by Express\n\n#### `externalConfig`\nexternal configuration for your express app (can be used for configuring letsencrypt)\n\n#### `ssl`\nSSL options (`key`, `cert` or `pfx`) to allow set https protocol\n\n#### `redirectToHttps`\nAutomatically redirect HTTP request to HTTPS if ssl enabled\n\n#### `portHttp`\nThe port to listen for http protocol if ssl enabled. If you don't want http and https, don't add this field.\n\n#### `middlewares`\nObject to add custom middleware functions to Express, don't forget to add them into `middlewares.order` or they will not be called\n\n### `init`\nMethod to customize express instance\n\n## Contributing\nWe love contributions! Please check out our [Contributor's Guide](https://github.com/fabrix-app/fabrix/blob/master/.github/CONTRIBUTING.md) for more\ninformation on how our projects are organized and how to get started.\n\n## License\n[MIT](https://github.com/fabrix-app/spool-express/blob/master/LICENSE)\n\n[fabrix-image]: http://i.imgur.com/zfT2NEv.png\n[fabrix-url]: http://fabrix.app\n[npm-image]: https://img.shields.io/npm/v/@fabrix/spool-express.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/@fabrix/spool-express\n[ci-image]: https://img.shields.io/circleci/project/github/fabrix-app/spool-express/master.svg\n[ci-url]: https://circleci.com/gh/fabrix-app/spool-express/tree/master\n[daviddm-image]: http://img.shields.io/david/fabrix-app/spool-express.svg?style=flat-square\n[daviddm-url]: https://david-dm.org/fabrix-app/spool-express\n[gitter-image]: http://img.shields.io/badge/+%20GITTER-JOIN%20CHAT%20%E2%86%92-1DCE73.svg?style=flat-square\n[gitter-url]: https://gitter.im/fabrix-app/Lobby\n[twitter-image]: https://img.shields.io/twitter/follow/FabrixApp.svg?style=social\n[twitter-url]: https://twitter.com/FabrixApp\n[coverage-image]: https://img.shields.io/codeclimate/coverage/github/fabrix-app/spool-express.svg?style=flat-square\n[coverage-url]: https://codeclimate.com/github/fabrix-app/spool-express/coverage\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabrix-app%2Fspool-express","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabrix-app%2Fspool-express","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabrix-app%2Fspool-express/lists"}