Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Delight

minimal web framerwork inspired by express.js for deno

import * as delight from "https://deno.land/x/[email protected]/app.ts";
import Router from "https://deno.land/x/[email protected]/router.ts";



const app = new delight()
const router = new Router()


router.get("/",(req:any)=>{


return new Response("path admin")
})


app.use("/admin",router)



app.get('/',(req)=>{
return new ReSponse('hello world')

})

app.post('/users',async (req)=>{

    const {name,email} = await req.json()
    return new Response(`hello ${name} your email is ${email}`)
})



app.use("/:",(req)=>{

    return new Response('error 404',{status:404})
})

//define a path for static files, for default is /public
app.fixed("/static")



app.listen(3000)

how to use delight

the simplest way to use it is to import from "https://deno.land/x/[email protected]/app.ts"; "

import * as delight from "https://deno.land/x/[email protected]/app.ts";

features

  • routing
  • simple middleware
  • simple static file server

About

minimal framework http deno,inspired by express

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages