Registry / devops / q3-api

q3-api

JSON →
library4.6.1jsnpmunverified

Q3 API (v4.6.1, monthly releases) is an opinionated Node.js framework that bundles Express and Mongoose to automate REST API setup including access control, routing, error handling, task scheduling, and multitenancy. It reduces boilerplate by providing a config-driven startup with environment variables for database, S3, mailgun, and more. Unlike generic Express starters, Q3 API enforces a specific project structure and integrates its own access control, localization, and job scheduling packages (q3-core-access, q3-locale, q3-core-scheduler). Requires Node 14+.

npm install q3-api
INSTALL
IMPORT
SIG · Q3-API
Q
q3-api
devopsjavascriptv4.6.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

Q3 (default)
const Q3 = require('q3-api');
import Q3 from 'q3-api';
This package is CJS only; ESM imports are not supported.
config
const { config } = require('q3-api');
const { Q3Config } = require('q3-api');
Named export 'config' is available, but default export is most common.
start
const Q3 = require('q3-api'); Q3.start();
const { start } = require('q3-api'); start();
start is not a named export; call it via the default export.

Basic Q3 API server setup with dotenv and default config.

const Q3 = require('q3-api'); require('dotenv').config(); // Minimal configuration Q3.config({ location: __dirname, }); // Start the server Q3.start();
Debug
Known issues
breakingMongoose v6 is required; using Mongoose v5 or v7 may cause runtime errors.
fix
Install mongoose@6.13.8 (the peer dependency version).
affects: >=4.0.0
deprecatedThe 'enableServerToServer' config option is deprecated and will be removed in v5. Use 'cors' option instead.
fix
Replace with Q3.config({ cors: { origin: true } }) for same behavior.
affects: >=4.5.0
gotchaEnvironment variable ARCHITECTURE must be set to 'multitenant' for multitenancy; missing it causes silent fallback to single tenant.
fix
Add ARCHITECTURE=multitenant to your .env file if you need multitenancy.
affects: >=4.0.0
gotchaThe 'views' directory is not used; the framework is headless. Do not create a 'views' folder or expect rendering.
fix
Place your client code in 'client/' at the project root.
affects: >=4.0.0
breakingNode.js 12 is no longer supported. Requires Node 14+.
fix
Upgrade Node.js to version 14 or later.
affects: >=4.6.0
deprecatedThe 'FRESHBOOKS_*' environment variables are deprecated and will be removed in v5 in favor of a generic billing plugin.
fix
Migrate to the new q3-plugin-billing package when available.
affects: >=4.3.0
Errors
Common errors & fixes
TypeError: Q3.config is not a function
Using import syntax with a CJS-only package (ESM not supported).
fix
Use require('q3-api') instead of import.
Error: MongooseError: The `uri` parameter to `openUri()` must be a string, got "undefined". Make sure the first parameter to `mongoose.connect()` or `mongoose.createConnection()` is a string.
Missing CONNECTION environment variable.
fix
Set CONNECTION in your .env file to a valid MongoDB connection string.
Error: listen EADDRINUSE :::3000
Default port (3000) is already in use.
fix
Set PORT environment variable to a different value or kill the process using the port.
ReferenceError: window is not defined
Attempting to run in a browser environment; Q3 API is server-only.
fix
Ensure your code runs in Node.js, not in a browser.
Upgrade
Version history
4.6.1latest on npm
Audit
Dependencies
expressrequiredWeb framework for routing and middleware
mongooserequiredMongoDB ODM for database operations
Agent activity
9 hits · last 30 days
node
8
Amazon
1
Resources
packageq3-api
q3-api — npm install q3-api · libregistry