Bun Runtime using built-in features for rjweb-server
.
๐ Homepage ๐ Documentation
This Package is intended to be used in the backend. THIS PACKAGE WILL ONLY WORK WITH BUN.
- โ๏ธ ESM
- โ๏ธ CJS
- โ๏ธ Typescript
npm install @rjweb/runtime-bun
yarn add @rjweb/runtime-bun
pnpm add @rjweb/runtime-bun
bun install @rjweb/runtime-bun
import { Server } from "rjweb-server"
import { Runtime } from "@rjweb/runtime-bun"
const server = new Server(Runtime, {
port: 8080 // https://server.rjweb.dev/types/ServerOptions
})
server.path('/', (path) => path
.http('GET', '/', (http) => http
.onRequest((ctr) => {
return ctr.print('Hello World!')
})
)
)
server.start().then((port) => {
console.log(`Server started on port ${port}!`)
})
๐ค 0x7d8 ๐ Website โญ GitHub
Contributions, issues and feature requests are welcome! Feel free to check issues page.
Give a โญ๏ธ if this project helps you!
Copyright ยฉ 2024 0x7d8. This project is MIT licensed.