Quick Start
Get up and running with MoroJS in minutes. This guide will walk you through creating your first high-performance API.
Prerequisites
- Node.js 18+ installed
- Basic TypeScript knowledge
- Package manager (npm, yarn, or pnpm)
1. Installation
ESM-Only Framework
MoroJS is built for modern JavaScript and requires ESM (ES Modules). Make sure your project uses "type": "module" in package.json and proper TypeScript configuration for ESM support.
npm
bash
yarn
bash
pnpm
bash
Create Your Project
bash
2. Your First API
src/server.ts
typescript
3. Run Your API
Start Development Server
bash
Test Your API
Your API is now running! Try these endpoints:
GET http://localhost:3000/GET http://localhost:3000/users/123
4. Adding Type-Safe Validation
MoroJS includes built-in Zod validation for type-safe request handling:
src/server.ts - With Validation
typescript
5. Level Up with MoroJS CLI
Ready for more advanced features? The MoroJS CLI can help you build production-ready applications with enterprise features, database integration, and automated deployment.
Quick Project Setup
Generate a full project
bash
Add Advanced Modules
Generate complete modules
bash
What You Get
Project Scaffolding
- • TypeScript configuration
- • Database adapters
- • Authentication setup
- • Testing framework
Advanced Features
- • Module generation
- • Database migrations
- • Security scanning
- • API documentation
Deployment
- • Multi-runtime support
- • Automated deployment
- • Configuration management
- • Production optimization
Next Steps
Performance Tip
Your API is already optimized for production! MoroJS delivers 68k+ req/sec out of the box. For production deployment, make sure to:
- Set
NODE_ENV=production - Enable compression middleware
- Configure appropriate logging levels