@tsed/platform-fulmine
v8.47.1
Published
A TypeScript Framework on top of fulmine.js, the Express 5 API on uWebSockets.js
Maintainers
Readme
A package of Ts.ED framework. See website: https://tsed.dev/getting-started/
Installation
Run npm command (or yarn):
npm install --save @tsed/platform-fulmine @tsed/platform-express fulmine.js expressfulmine.js is an Express 5 compatible framework on
uWebSockets.js. The platform uses the Express adapter for the routing, so the Express middlewares of a Ts.ED
app stay the same, and the app listens on uWebSockets.js instead of the http server of node. express is
still needed, as a peer of @tsed/platform-express.
About the install:
- fulmine.js depends on
uWebSockets.jsfrom GitHub (github:uNetworking/uWebSockets.js#v20.71.0), not from the npm registry, so the install needs access to github.com. Behind a registry mirror or a proxy that only allows npm, it fails. - uWebSockets.js is a native addon with prebuilt binaries: Node 22, 24 or 26 on Linux or macOS (x64 or arm64) or Windows (x64). Not Alpine (glibc 2.38+ is needed).
- On Bun and Deno fulmine.js does not load uWebSockets.js and listens with their own
node:http, plain HTTP only.
Usage
import {PlatformFulmine} from "@tsed/platform-fulmine";
import {Server} from "./Server.js";
const platform = await PlatformFulmine.bootstrap(Server, {httpPort: 8083});
await platform.listen();To pass options to fulmine, such as TLS with uwsOptions, give your own app:
import fulmine from "fulmine.js";
const platform = await PlatformFulmine.bootstrap(Server, {
httpPort: 8443,
fulmine: {
app: fulmine({uwsOptions: {key_file_name: "key.pem", cert_file_name: "cert.pem"}})
}
});httpsPort is not supported: TLS belongs to uWebSockets.js, set it on the fulmine app.
See Ts.ED capabilities for more information.
Contributors
Please read contributing guidelines here
Backers
Thank you to all our backers! 🙏 [Become a backer]
Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]
License
The MIT License (MIT)
Copyright (c) 2016 - 2022 Romain Lenzotti
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
