https://github.com/pouchlabs/fasteejs
fasteejs blazing fast web application framework
https://github.com/pouchlabs/fasteejs
api api-rest backend bun cloudflare deno edge expressjs framework http nodejs workers
Last synced: 3 months ago
JSON representation
fasteejs blazing fast web application framework
- Host: GitHub
- URL: https://github.com/pouchlabs/fasteejs
- Owner: pouchlabs
- License: mit
- Created: 2024-08-24T15:50:18.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-02-02T18:54:20.000Z (4 months ago)
- Last Synced: 2025-02-02T18:55:17.384Z (4 months ago)
- Topics: api, api-rest, backend, bun, cloudflare, deno, edge, expressjs, framework, http, nodejs, workers
- Language: JavaScript
- Homepage: https://fasteejs.top
- Size: 195 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: license.md
Awesome Lists containing this project
README

# blazing fast web application frameworkBuilt on web Standards
Fast, Lightweight,runs on any JavaScript runtime
# Features
* fast
* middlewares
* already know express Yei!
* multi-runtime
* express ecosystem support
* gracefully shutsdown
* has built-in goodies## packages
* Fastee - a blazing fast express alternative,runs on nodejs,bun and deno only.
* edge - a web application framework can serve a hono alternative,it's fast,runs on bun,deno,and workers.# How to install Fastee
found as fasteejs```bash
npm install fasteejs
```## How to install Edge
found as @fasteejs/edge```bash
npm install @fasteejs/edge
```
```bash
npm i fasteejs
```
# Fastee usage
runs on node,bun and deno
```js
import {Fastee} from "fasteejs"const app = new Fastee(); //uses defaults
const app1 = new Fastee({port:4000,delay:30000}) //pass port and shutdown delay
let server = http.createServer().listen(5000)
const app2 = new Fastee({server,delay:30000}) //passed listening server must be already running
app.get('/', function (req, res) {
res.send('Hello World')
})app.static("static",{dotfiles:false}) //pass valid folder path and optional config
//shutdown listener
app.onShutdown((signal)=>{
//call service before shutdown
console.log("before",signal)
})export {app,app1,app2}
```
## edge usage
```js
import Edge from "@fasteejs/edge" //or import {Edge} from "@fasteejs/edge"const app = new Edge();
console.log(app)
//global wares
app.use((req,res)=>{//no next funtion required
req.id="ware1"
},(req,res)=>{
console.log(req.id)
return res.json({msg:"success"})
})
//bwares route specific wares
app.use("/api",(req,res)=>{//no next funtion required
req.id="ware1"
},(req,res)=>{
console.log(req.id)
return res.json({msg:"success"})
})
/*handler
a handler must return a response
*/
app.get("/",async (req,res)=>{
console.log(req)
//object
return new Response("hi from server")//or return res.text("hi edge")
})export default app //must do
```