Skip to main content

Overview

This example shows a minimal Databite server that exposes REST endpoints for your frontend to use.

Repository

The example server is available in our open-source repository:

View on GitHub

Explore the complete implementation with source code and configuration

Getting Started

Prerequisites

  • Node.js >= 16.0.0
  • npm, yarn, pnpm, or bun

Steps

  1. Installation
# Clone the repository
git clone https://github.com/DatabiteDev/databite.git
cd databite/packages/example-server

# Install dependencies
npm install

# Or with other package managers
yarn install
pnpm install
bun install
  1. Configure environment
# .env.local
SLACK_CLIENT_ID=your-slack-client-id
SLACK_CLIENT_SECRET=your-slack-client-secret
SLACK_REDIRECT_URI=http://localhost:3001/auth/slack/callback
  1. Start the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
  1. Test endpoints
curl http://localhost:3001/api/health
curl http://localhost:3001/api/integrations
Next, connect from your frontend using @databite/connect.