Go to file
Brian Ferri 6059c968a9 Merge branch 'develop' 2024-05-10 11:58:47 +02:00
.github/ISSUE_TEMPLATE Update configuration files and fix formatting issues adds file router 2024-03-26 09:17:08 +01:00
.husky Fix linting and build scripts in pre-commit hook 2024-03-13 16:56:10 +01:00
.vscode Update configuration files and fix formatting issues adds file router 2024-03-26 09:17:08 +01:00
examples fixes implementation of the file router middleware handler 2024-04-18 14:37:29 +02:00
src BREAKING CHANGES: refactors middleware handling in Futen server to allow route mapping on middleware 2024-05-10 11:58:08 +02:00
tests BREAKING CHANGES: refactors middleware handling in Futen server to allow route mapping on middleware 2024-05-10 11:58:08 +02:00
.eslintrc.js Refactor .eslintrc.js to ignore 'examples/**/*' in linting 2024-04-21 13:33:02 +02:00
.gitignore initial commit 2024-02-29 14:30:45 +01:00
.npmignore Update configuration files and fix formatting issues adds file router 2024-03-26 09:17:08 +01:00
CONTRIBUTING.md Update configuration files and fix formatting issues adds file router 2024-03-26 09:17:08 +01:00
LICENSE initial commit 2024-02-29 14:30:45 +01:00
README.md Update configuration files and fix formatting issues adds file router 2024-03-26 09:17:08 +01:00
bake.ts Update configuration files and fix formatting issues adds file router 2024-03-26 09:17:08 +01:00
bun.lockb tests 2024-03-11 10:33:39 +01:00
package.json BREAKING CHANGES: refactors middleware handling in Futen server to allow route mapping on middleware 2024-05-10 11:58:08 +02:00
tsconfig.json Update configuration files and fix formatting issues adds file router 2024-03-26 09:17:08 +01:00

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!