Get your Express.js API secured with KoruAI in just a few minutes. Follow these 6 simple steps to start protecting your application with AI-powered security.

Step 1: Create Your Account

First, you’ll need to create a KoruAI account to get started.
  1. Visit KoruAI Dashboard
  2. Click on “Sign Up” to create your account
  3. Complete the registration process
You can sign up using your email address or through GitHub/Google OAuth for faster registration.

Step 2: Create Your Application

Once logged in, you’ll need to create an application to get your API credentials.
  1. Navigate to your dashboard
  2. Click “Create New App” button
  3. Enter your application name
  4. Click “Create Application”
After creation, you’ll receive:
  • App ID: Your unique application identifier
  • API Key: Your authentication key for the KoruAI service
Keep your API key secure and never expose it in client-side code. Store it in environment variables.

Step 3: Install the SDK

Install the KoruAI Express.js SDK in your project:
npm install koruai
The KoruAI SDK is lightweight and has minimal dependencies to keep your application fast.

Step 4: Integrate KoruAI into Your Express App

Add KoruAI middleware to your Express.js application:
import express from "express";
import KoruAI from "koruai";

const app = express();

// Initialize KoruAI middleware
app.use(
  KoruAI({
    apiKey: process.env.KORUAI_API_KEY,
    appId: process.env.KORUAI_APP_ID,
  })
);

// Your existing routes
app.get("/api/users", (req, res) => {
  // Your application logic here
  res.json({ users: [] });
});

app.listen(3000, () => {
  console.log("Server running on port 3000 with KoruAI protection");
});

Configuration Options

apiKey
string
required
Your KoruAI API key for authentication
appId
string
required
Your application ID from the KoruAI dashboard
blockRealtime
boolean
default:"false"
Enable real-time blocking of suspicious requests. When true, KoruAI will automatically block requests that match threat patterns.

Step 5: Generate Traffic for Analysis

KoruAI needs to analyze your API traffic patterns to create effective security rules.
  1. Deploy your application with KoruAI integrated
  2. Generate normal user traffic to your API endpoints
  3. Wait for sufficient requests to be collected (recommended: 100+ requests per endpoint)
How much traffic do I need? KoruAI works best with at least 100 requests per endpoint. The more diverse and realistic traffic you have, the better the AI can understand your API patterns and create accurate security rules.

Monitor Your Traffic

You can monitor incoming requests in your KoruAI dashboard:
  • Total Requests: Number of requests processed
  • Unique Endpoints: API endpoints discovered
  • Request Patterns: Traffic patterns being learned

Step 6: Create Security Policies

Once you have sufficient traffic data, create AI-powered security policies:
  1. Go to your application dashboard
  2. Navigate to the “Policies” section
  3. Click “Create Policies” button
  4. Wait for the AI to analyze your traffic and generate custom rules
The policy creation process includes:
  • Traffic Analysis: AI analyzes your request patterns
  • Rule Generation: Custom security rules are created for your specific API
  • Validation: Rules are tested against your traffic patterns
  • Deployment: Active protection begins

What Happens Next?

Once your policies are active, KoruAI will: Monitor all incoming requests with zero performance impact
Detect anomalous behavior using your custom AI rules
Block suspicious requests (if blockRealtime is enabled)
Provide detailed analytics in your dashboard
Automatically adapt to new endpoints and patterns

Verification

To verify everything is working correctly:
  1. Check your dashboard for incoming request data
  2. Look for the policy creation status
  3. Monitor the analytics for any detected anomalies

Need Help?

Common Issues