6059c968a9 | ||
---|---|---|
.github/ISSUE_TEMPLATE | ||
.husky | ||
.vscode | ||
examples | ||
src | ||
tests | ||
.eslintrc.js | ||
.gitignore | ||
.npmignore | ||
CONTRIBUTING.md | ||
LICENSE | ||
README.md | ||
bake.ts | ||
bun.lockb | ||
package.json | ||
tsconfig.json |
README.md
☁️ Futen 風天 (Heavenly Wind)
A (very) lightweight web framework, using decorators, simplifying syntax
Get started with:
bun init
bun i futen
import Futen, { route } from 'futen';
@route('/')
class Index {
public get() {
return new Response('Hello, World!');
}
}
const server = new Futen({
Index
});
console.log(`Server is running at http://localhost:${server.instance.port}`);
Know how
route
defines an HTTP/REST route class which reserves the following methods as "keywords":
get
head
post
put
delete
connect
options
trace
patch
ws
, similarly to the route
decorator, reserves WebSocket event "keywords", which are documented in the Bun websocket docs, directly referencing the following methods:
message
open
close
drain
ping
pong
To see how they could be used check out the examples
Contributors
🤝 Become a contributor!
- Read the contributing guidelines
- Fork it!
- Do stuff...
- Submit a pull request!