@fourze/server
TypeScript icon, indicating that this package has built-in type declarations

0.30.2 • Public • Published

Fourze Server

Usage

import { defineRouter } from "@fourze/core";
import { createServer } from "@fourze/server"

const server = createServer({
    host: "localhost",
    base: "/api"
})

server.use(defineRouter(router=>{
  router.get("/hello",(req,res)=>{
    return "hello,world"
  })
}))

server.listen(7609)

GET http://localhost:7609/api/hello

{
  "hello": "world"
}

Readme

Keywords

none

Package Sidebar

Install

npm i @fourze/server

Weekly Downloads

8

Version

0.30.2

License

MIT

Unpacked Size

70.6 kB

Total Files

8

Last publish

Collaborators

  • chizukicn