Getting Started
ProBun is a fast, lightweight file-based routing system for Bun servers. It is designed to be simple and easy to use.
Installation
You must have Bun installed before you can use Probun.
If you have Bun installed, you can install Probun using the following command:
Creating a Route
Here we will create a simple get route that returns a JSON response. Create a new file in the routes
directory called index.ts
and add the following code:
Running the Server
In your index.ts (not in the routes directory), add the following code:
Now you can run your server using the following command:
Now you can visit http://localhost:3000
in your browser to see your server running.