Getting Started
This guide will walk you through installing, configuring, and running Holo Bridge.
Prerequisites
- Node.js 18 or higher
- npm or yarn package manager
- A Discord bot token
Installation
1. Clone the Repository
git clone https://github.com/your-repo/discord-web-bridge.git
cd discord-web-bridge
2. Install Dependencies
npm install
Configuration
Environment Variables
Copy .env.example to .env and fill in your values:
# Discord Bot Token (required)
# Get this from https://discord.com/developers/applications
DISCORD_TOKEN=your_discord_bot_token_here
# API Configuration
PORT=3000
API_KEY=your_secure_api_key_here
# Optional: Enable debug logging
DEBUG=false
| Variable | Required | Description |
|---|---|---|
DISCORD_TOKEN |
Yes | Your Discord bot token |
API_KEY |
Yes | API key for authenticating requests |
PORT |
No | Server port (default: 3000) |
DEBUG |
No | Enable debug logging (default: false) |
Running the Server
Development Mode
npm run dev
Production Mode
npm run build
npm start
Discord Bot Setup
Follow these steps to create a Discord bot and invite it to your server:
- Go to the Discord Developer Portal
- Click "New Application" and give it a name
- Go to the "Bot" section in the left sidebar
- Click "Add Bot" and confirm
- Enable the following Privileged Gateway Intents:
- Presence Intent
- Server Members Intent
- Message Content Intent
- Click "Reset Token" to get your bot token and copy it to your
.envfile
Inviting the Bot
- Go to the "OAuth2" → "URL Generator" section
- Select the following scopes:
botapplications.commands
- Select the permissions your bot needs (Administrator for full access)
- Copy the generated URL and open it in your browser
- Select a server and authorize the bot
⚠️ Important: Keep your bot token and API key secret. Never commit them to version
control.
Testing the API
Once the server is running, you can test the API with curl:
# List all guilds
curl -H "X-API-Key: your_api_key" http://localhost:3000/api/guilds