dex.js
v1.0.0
Published
  ;📚 Learn the Dex.js Decorators
@ControleRoute(path: string)
Defines the base route path for a controller.
@ControleRoute('/users')
class UsersController { ... }@RoutePath(method: 'get' | 'post' | 'put' | 'delete', path: string, middlewares?: Function[])
Defines a method as a route handler.
@RoutePath('get', '/')
public async getAll(req: Request, res: Response) {
res.send('Hello from users!');
}With middleware:
@RoutePath('get', '/', [myMiddleware])⚙️ CORS Configuration
You can pass custom CORS options directly to the createDexApp function:
createDexApp({
port: 5000,
controllers: [...],
corsOpt: {
origin: 'http://localhost:3000',
credentials: true
}
});🧪 Work In Progress
- [ ] Built-in validation decorators
- [ ] Global exception handling
- [ ] Built-in logger
- [ ] CLI plugin system
- [ ] File-based routing (optional mode)
📖 License
MIT © 2025 — made with ❤️ by DequElite
Wanna contribute or ask something? Open an issue or ping me on GitHub 💬
