A framework prepared for web.
It supports
- object-oriented programming
- expressjs middlewares
- async/await
- Web Straight Line Theory
- decorators/annotations
- handy web processes like data parsing/filtering, error handling, websocket support
It separates business logic from web logic where MVC is none necessary.
It is simple but powerful.
The web straight line theory can be drawn like this:
A very simple example can be like this:
import { Aex, http } from "@aex/core";
class Helloworld {
public message: string;
constructor(message) {
this.message = message;
}
@http("/")
public async all(req: any, res: any) {
res.end(this.message);
}
}
const aex = new Aex();
aex.push(Helloworld, "Hello world!");
aex.prepare().start(8086);
And when you visit the server, you will get the output message:
Hello world!
You can check it here for more information.
Top comments (0)