@enfyra/create-server
v0.1.40
Published
Create a new Enfyra server application with an interactive CLI
Maintainers
Readme
@enfyra/create-server
Create a new Enfyra server application with an interactive CLI setup.
🚀 Quick Start
# Using npx (recommended)
npx @enfyra/create-server my-project
# Using npm
npm init @enfyra/create-server my-project
# Using yarn
yarn create @enfyra/create-server my-project
# Using bun
bun create @enfyra/create-server my-project📋 Requirements
- Node.js >= 20.0.0
- Package manager (npm ≥8.0.0, yarn ≥1.22.0, or bun ≥1.0.0)
- Database server (MySQL, MariaDB, PostgreSQL, or MongoDB)
- Redis server
🎯 What You Get
The interactive CLI sets up a complete Enfyra server with:
- Database integration (MySQL/PostgreSQL/MariaDB/MongoDB)
- Redis caching
- JWT authentication
- Environment configuration
- Development tools
📝 Getting Started
After creating your project:
cd my-project
npm run startProduction Secret Key
The CLI generates a random SECRET_KEY in .env. Keep that value stable and backed up for production deployments.
SECRET_KEY signs auth tokens and is also used to derive the encryption key for columns marked isEncrypted=true. If you change or lose it, existing JWT/session tokens become invalid and previously encrypted field values cannot be decrypted. In clustered or multi-container deployments, every server instance for the same Enfyra app must use the same SECRET_KEY.
📚 Documentation
For detailed setup, API usage, and development guides, visit the Enfyra Installation Guide. Read replicas (DB_REPLICA_URIS) are configured in .env after install; the CLI does not prompt for them.
