Registry / communication / bot-middleware-jubi

bot-middleware-jubi

JSON →
library1.0.102jsnpmunverified

bot-middleware-jubi is a Node.js server middleware for building chatbot backends with support for Facebook Messenger, Twilio WhatsApp, Firebase Cloud Messaging (FCM), and web sockets. Version 1.0.102 is the latest. It requires MongoDB for storage and optionally Redis for clustering. The package provides a unified configuration interface for multiple channels, including passphrase-based authentication, dashbot integration, and static file serving. It is primarily used with CommonJS require() and has minimal TypeScript support.

npm install bot-middleware-jubi
INSTALL
IMPORT
SIG · BOT-MIDDLEWARE-JUB
B
bot-middleware-jubi
communicationjavascriptv1.0.102
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Server
const { Server } = require('bot-middleware-jubi');
import { Server } from 'bot-middleware-jubi';
This package is CommonJS only; ES module import will fail.
facebook
const { facebook } = require('bot-middleware-jubi');
const facebook = require('bot-middleware-jubi').facebook;
Direct destructuring works; accessing as property also valid.
createAdapter
const { createAdapter } = require('bot-middleware-jubi');
Used to scaffold adapter folders for API intents.

Initializes a bot server with MongoDB, serves static files, and sets up Facebook Messenger webhook.

const { Server, facebook } = require('bot-middleware-jubi'); Server({ root: 'https://yourdomain.com/path', socketLocalPath: '/socket', httpPort: 4000, dbUri: 'mongodb://root:root@127.0.0.1:27017/mydb', staticDirectory: __dirname + '/static', adapterPath: '/adapter', adapterDirectory: __dirname + '/adapter', projectId: 'myproject_100911645983', passphraseMiddleware: 'supersecret', timeoutSeconds: 60 }, () => { facebook({ verificationToken: 'verify', pageAccessToken: process.env.PAGE_ACCESS_TOKEN ?? '', path: '/fb' }); console.log('Server initialized'); });
Debug
Known issues
gotchaDo not use ES module imports (import/export) with this package; it is CommonJS only and may cause runtime errors.
fix
Use const { ... } = require('bot-middleware-jubi'); instead of import.
affects: >=1.0.0
gotchaThe dbUri must point to a running MongoDB instance; the package does not provide connection pooling warnings if the URI is invalid.
fix
Ensure MongoDB is running and the URI is correct before calling Server().
affects: >=1.0.0
deprecatedThe properties 'dashbotKey', 'fcmServerKey', and 'firebaseWebConfig' are optional but may be removed in a future version.
fix
Check the latest documentation for replacement APIs if they are missing.
affects: <=1.0.102
Errors
Common errors & fixes
TypeError: Server is not a function
Using ES module import or incorrect destructuring.
fix
Use const { Server } = require('bot-middleware-jubi'); and ensure Node.js version supports CommonJS.
MongoError: failed to connect to server [localhost:27017]
MongoDB is not running or the dbUri is incorrect.
fix
Start MongoDB or update the dbUri with correct credentials and host.
Error: listen EADDRINUSE :::4000
Port 4000 is already in use by another process.
fix
Change the httpPort option to an available port or kill the process using port 4000.
Upgrade
Version history
1.0.102latest on npm
Audit
Dependencies
mongodbrequiredRequired for database operations (storing conversations, user data).
redisoptionalRequired only if cluster mode is enabled.
Agent activity
33 hits · last 30 days
node
30
OpenAI (training)
1
Resources
bot-middleware-jubi — npm install bot-middleware-jubi · libregistry