An open API service indexing awesome lists of open source software.

https://github.com/monoscope-tech/test-bun-express


https://github.com/monoscope-tech/test-bun-express

Last synced: 10 months ago
JSON representation

Awesome Lists containing this project

README

          

# Bun Express API with OpenTelemetry

## Installation

```bash
bun install
```

## Configuration

The application uses environment variables for configuration. These are stored in a `.env` file:

- `PORT`: The port number for the Express server (default: 3000)
- `NODE_ENV`: The environment (development, production, etc.)
- `SERVICE_NAME`: The name of the service for OpenTelemetry
- `OTEL_EXPORTER_OTLP_ENDPOINT`: The endpoint for the OpenTelemetry collector

## Running the Application

Start the server:

```bash
bun run --preload './otel.ts' index.ts
```

The server will be available at

## API Endpoints

- `GET /`: Returns a hello world message
- `GET /health`: Returns a health check status