Registry / devops / fast-api

fast-api

JSON →
library0.4.0jsnpmunverified

Fast API (version 0.4.0) is a Node.js framework for building RESTful APIs by organizing service files in a folder structure. It automatically maps file paths to API endpoints, supports nested folders, and integrates Bluebird promises and Lodash utilities. Unlike other frameworks, it eliminates manual route definitions and auto-generates JSON documentation. Current release is 0.4.0; maintenance is sporadic with no recent updates.

npm install fast-api
INSTALL
IMPORT
SIG · FAST-API
F
fast-api
devopsjavascriptv0.4.0
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.

createServer
const Fast = require('fast-api'); const app = Fast.createServer({ apiRoot: '/path/to/api' });
import Fast from 'fast-api';
Package uses CommonJS; no ESM exports available.
routes export pattern
module.exports.routes = { '/': { httpMethod: 'get', service: 'handler' } };
export const routes = ...
Must use module.exports for route definitions; ES module syntax not supported.
Core
// Inside service handler: Core.promise, Core.utils, Core.api.otherService()
require('fast-api').Core
Core is a global object injected into service handlers, not directly accessible via require.

Shows minimal server setup using CommonJS require, specifying apiRoot and listening on port 3000.

const Fast = require('fast-api'); const Path = require('path'); const app = Fast.createServer({ apiRoot: Path.join(__dirname, 'api') }); app.listen(3000, () => console.log('Server running on port 3000'));
Debug
Known issues
deprecatedPackage is no longer actively maintained; last release 0.4.0 in 2015.
fix
Consider migrating to a modern framework like Express.js or Fastify.
affects: all
breakingService files must export a 'routes' object; any other export structure will be ignored.
fix
Ensure each API module exports an object with 'routes' property.
affects: >=0.1.0
gotchaThe 'apiDocsPath' option in createServer hides default docs; misconfiguration can cause 404 errors.
fix
Set 'exposeDocs: false' to disable docs, or ensure 'apiDocsPath' is a valid string.
affects: >=0.3.0
gotchaParameters defined in route config override request query/path values; missing param validation causes silent failures.
fix
Define all expected parameters with correct paramType (query, path, etc.) in route configuration.
affects: >=0.2.0
breakingCore.api.serviceName() invocations return promises; forgetting to return a promise breaks async flow.
fix
Always return a promise from service handlers, or use Core.promise (Bluebird) for chaining.
affects: >=0.1.0
Errors
Common errors & fixes
Error: Cannot find module 'fast-api'
Package not installed or requires to be installed locally
fix
Run 'npm install fast-api' in your project directory.
TypeError: Fast.createServer is not a function
Incorrect import; require returns an object with createServer method
fix
Use 'const Fast = require("fast-api");' then 'Fast.createServer(...)'.
Cannot find module 'api/myservice'
apiRoot path incorrect or service file missing
fix
Ensure 'apiRoot' option points to an existing directory containing .js files with routes export.
Invalid parameter: id
Route parameter not defined in route configuration
fix
Add parameter definition with paramType: "path" in the route config for /:id.
Upgrade
Version history
0.4.0latest on npm
Audit
Dependencies
expressrequiredCore HTTP server dependency
bluebirdrequiredPromise library used internally
lodashrequiredUtility module exposed via Core.utils
Agent activity
2 hits · last 30 days
node
2
Resources
fast-api — npm install fast-api · libregistry