Daniel-Boll / axum-js

A Axum http wrapper for NodeJS
MIT License
5 stars 3 forks source link

Implement simple api example #2

Closed Daniel-Boll closed 1 year ago

Daniel-Boll commented 1 year ago

closes #1

Daniel-Boll commented 1 year ago

For the sake of simplicity of the Proof of Concept I manage only to make a simple app, by now with the design decision of using a class to instantiate the app and that don't expect any callbacks.

import { AxumApp } from "./index";

const app = new AxumApp();

app.get("/");

app.listen(3000);
❯ http :3000
HTTP/1.1 200 OK
...
Hello World!