Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 457 Bytes

README.md

File metadata and controls

30 lines (23 loc) · 457 Bytes

Bun Server

Install

  • Install Bun and thats it.

Run

bun run ./src/index.ts

Example

import { server ,ConfigRoutes } from "./WebServer";

const app = new ConfigRoutes();

app.get('/', () => {
    return 'Hello This is home page';
})

app.get('/users', () => {
    return 'All users will show here.';
})

app.get('/foo', () => {
    return 'Foo';
})
// Pass port and the instance of ConfigureRoutes
server(1234, app);