ovenjoy
TypeScript icon, indicating that this package has built-in type declarations

0.1.0-alpha.1 • Public • Published

Ovenjoy logo

Baking Delicious Web Servers with Bun

npm NPM npm

🥯 Ovenjoy

Welcome to OvenJoy, a lightweight and flexible web framework for Bun. OvenJoy is designed to simplify the process of building web applications and APIs by providing you with powerful routing and middleware capabilities. In this quick start guide, we'll walk you through the steps to get started with OvenJoy.

Read docs for detailed info

Prerequisites

Before you begin, make sure you have the following prerequisites installed on your system:

  • Bun: is all you need to get started.
curl https://bun.sh/install | bash

and init the Bun project

bun init

Installation

You can install OvenJoy in your Bun project using bun package manager. Open your terminal and run the following command:

bun add ovenjoy

This will add OvenJoy to your project's dependencies.

Creating a Simple OvenJoy Application

Let's create a simple OvenJoy application to demonstrate its basic features. Create a new JavaScript file, e.g., app.js, and follow along:

// Import the OvenJoy framework
import OvenJoy from 'ovenjoy';

// Create an OvenJoy application
const app = OvenJoy();

// Define a route
app.get('/', (req, res) => {
  res.json({ message: 'Hello, OvenJoy!' });
});

// Start the server
app.listen(3000, () => {
  console.log('OvenJoy server is running on port 3000');
});

Start a development server by:

bun app.js

Open your browser and go to http://localhost:3000.

You should see your server is running.

Package Sidebar

Install

npm i ovenjoy

Weekly Downloads

0

Version

0.1.0-alpha.1

License

MIT

Unpacked Size

33.1 kB

Total Files

13

Last publish

Collaborators

  • shulapy