https://github.com/iivexii/simple-bun-web-server
https://github.com/iivexii/simple-bun-web-server
bun bun-server bun-simple-server bun-web-server web-server
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/iivexii/simple-bun-web-server
- Owner: IIvexII
- Created: 2022-08-07T06:00:41.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-08T06:50:07.000Z (over 3 years ago)
- Last Synced: 2024-04-28T03:21:08.007Z (almost 2 years ago)
- Topics: bun, bun-server, bun-simple-server, bun-web-server, web-server
- Language: TypeScript
- Homepage:
- Size: 124 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bun Server
## Install
* Install Bun and thats it.
## Run
```bash
bun run ./src/index.ts
```
## Example
```typescript
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);
```