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
npm
bash
yarn
bash
pnpm
bash
Create Your Project
bash
2. Your First API
src/server.ts
typescript
package.json scripts
json
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
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