Registry / devops / express-api-rest-gen

express-api-rest-gen

JSON →
library4.6.2jsnpmunverified

A minimal CLI tool to scaffold a production-ready Express REST API with support for JavaScript or TypeScript, database choices (MongoDB, PostgreSQL, MySQL), optional Jest testing, and an interactive prompt setup. Version 4.6.2 requires Node.js >=22.14.0. It differentiates itself by being zero-configuration, generating a well-structured project with best practices, and offering flexibility in language, database, and testing. The tool is actively maintained and easy to customize post-generation.

npm install express-api-rest-gen
INSTALL
IMPORT
SIG · EXPRESS-API-REST-G
E
express-api-rest-gen
devopsjavascriptv4.6.2
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.

express-api-rest-gen
npm i -g express-api-rest-gen
The package is a CLI tool, not imported programmatically.

Shows how to scaffold a new Express REST API project using the CLI tool via npx.

npx express-api-rest-gen # Follow prompts: project name, language (JS/TS), database, testing (Jest) cd your-project-name npm start
Debug
Known issues
breakingRequires Node.js >=22.14.0 and npm >=10.9.2 - older versions will fail
fix
Update Node.js to 22.14.0+ and npm to 10.9.2+
affects: >=4.6.0
gotchaThe generated project may contain placeholder files that require manual modification for database connection strings
fix
After generation, update .env with correct database credentials.
affects: >=4.0.0
deprecatedIn versions <4.0.0, the CLI used different prompt options (e.g., --yarn instead of --package-manager)
fix
Use the latest version to get the current CLI interface.
affects: <4.0.0
Errors
Common errors & fixes
Error: Cannot find module 'express-api-rest-gen'
Package not installed globally or not found in PATH
fix
Run 'npm i -g express-api-rest-gen' or use 'npx express-api-rest-gen'
Error: Node.js version must be >=22.14.0
Old Node.js version
fix
Update Node.js to 22.14.0 or higher
Express server fails to start: 'Module not found' for database driver
Database driver missing in generated project
fix
Manually install the required driver (e.g., 'npm install pg' for PostgreSQL) or use the matching dependencies from package.json.
Upgrade
Version history
4.6.2latest on npm
Audit
Dependencies
commanderrequiredCLI argument parsing
inquirerrequiredInteractive CLI prompts
Agent activity
4 hits · last 30 days
node
4
Resources
express-api-rest-gen — npm install express-api-rest-gen · libregistry