https://github.com/cmmvio/cmmv-express
HTTP adapter module for using Express as an HTTP server
https://github.com/cmmvio/cmmv-express
cmmv express http server
Last synced: about 2 months ago
JSON representation
HTTP adapter module for using Express as an HTTP server
- Host: GitHub
- URL: https://github.com/cmmvio/cmmv-express
- Owner: cmmvio
- License: mit
- Created: 2024-12-04T12:59:51.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-11T01:04:13.000Z (about 1 year ago)
- Last Synced: 2025-10-18T02:56:59.423Z (6 months ago)
- Topics: cmmv, express, http, server
- Language: TypeScript
- Homepage:
- Size: 442 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
Contract-Model-Model-View (CMMV)
Building scalable and modular applications using contracts.
## Description
CMMV (Contract-Model-Model-View) is a minimalistic and modular framework for building scalable applications in TypeScript. Inspired by modern design patterns, CMMV uses contracts to define the entire application, from ORM entities to REST controllers and WebSocket endpoints, allowing for a highly structured and maintainable codebase.
## Legacy Setup (Manual)
If you prefer to set up the project manually, you can still install the necessary modules individually:
```bash
$ pnpm add @cmmv/express express body-parser cors express-session helmet uuid
```
## Quick Start
The `@cmmv/express` module provides an alternative HTTP adapter based on [Express](https://expressjs.com/), allowing you to use Express middleware and features seamlessly with your CMMV application.
```typescript
import { Application } from "@cmmv/core";
import { DefaultHTTPModule } from "@cmmv/http";
import { ExpressAdapter } from "@cmmv/express";
import { ViewModule } from "@cmmv/view";
Application.create({
httpAdapter: ExpressAdapter, // Add the ExpressAdapter here
wsAdapter: WSAdapter,
modules: [DefaultHTTPModule],
services: [...],
contracts: [...]
});
```