Overview
Thefeathers generate app command scaffolds a complete Feathers application with all necessary configuration files, dependencies, and project structure.
Usage
Options
The name of your application. If not provided, defaults to the current directory name.
Interactive Prompts
When you run the command without options, you’ll be prompted for the following configuration:Language Selection
Prompt: “Do you want to use JavaScript or TypeScript?” Choices:- TypeScript (recommended)
- JavaScript
Application Name
Prompt: “What is the name of your application?” Default: Current directory name Validation: Cannot be the same as a dependency nameDescription
Prompt: “Write a short description” A brief description of your application that will be added topackage.json.
HTTP Framework
Prompt: “Which HTTP framework do you want to use?” Choices:- KoaJS (recommended)
- Express
API Transports
Prompt: “What APIs do you want to offer?” Choices (multi-select):- HTTP (REST) - checked by default
- Real-time - checked by default
Package Manager
Prompt: “Which package manager are you using?” Choices:- npm
- Yarn
- pnpm
Client Generation
Prompt: “Generate end-to-end typed client?” Generates a typed client that can be used with React, Angular, Vue, React Native, Node.js, etc.Schema Format
Prompt: “What is your preferred schema (model) definition format?” Choices:- TypeBox (recommended)
- JSON schema
- No schema (not recommended)
Database Connection
Prompt: “Which database are you connecting to?” Choices:- SQLite
- MongoDB
- PostgreSQL
- MySQL/MariaDB
- Microsoft SQL
- Another database (not configured automatically)
- MongoDB:
mongodb://127.0.0.1:27017/{app-name} - MySQL:
mysql://root:@localhost:3306/{app-name} - PostgreSQL:
postgres://postgres:@localhost:5432/{app-name} - SQLite:
{app-name}.sqlite - MSSQL:
mssql://root:password@localhost:1433/{app-name}
Generated Structure
The generator creates the following files and directories:Terminal Output Example
Dependencies Installed
The generator automatically installs the required dependencies based on your choices:Core Dependencies
@feathersjs/feathers- Core Feathers functionality@feathersjs/errors- Error handling@feathersjs/schema- Schema validation@feathersjs/configuration- Configuration management@feathersjs/transport-commons- Transport layer@feathersjs/adapter-commons- Database adapter commons@feathersjs/authentication- Authentication server@feathersjs/authentication-client- Authentication clientwinston- Logging
Framework-Specific
@feathersjs/koa(if KoaJS selected)@feathersjs/expressandcompression(if Express selected)@feathersjs/socketio(if Real-time selected)
Schema-Specific
@feathersjs/typebox(if TypeBox selected)
Database-Specific
- Database adapter (e.g.,
@feathersjs/mongodb,@feathersjs/knex) - Database client (e.g.,
mongodb,pg,mysql,sqlite3) knex(for SQL databases)
Dev Dependencies
nodemon- Development serveraxios- HTTP client for testsmocha- Testing frameworkcross-env- Cross-platform environment variablesprettier- Code formatting@feathersjs/cli- CLI tools@feathersjs/rest-client- REST client for tests
TypeScript-Specific Dev Dependencies
@types/mocha@types/nodets-nodetypescriptshx- Cross-platform shell commands
Next Steps
After generating your app:Generate a service
Add your first service to handle data operations