A web framework.
Simple web server that responds with Hello world
on each request.
import Server from "@pxe/server";
// Initialize a new server
const app = new Server();
// Add a middleware
app.use(async (ctx, next) => {
// Set the response to "Hello world"
ctx.response.body = "Hello world";
// Run the next middleware
// End the response if this is the last middleware
await next();
});
// Listen to port 3000
app.ls(3000);
- Web cookie
- Redirect
- Error handling
- Middlewares
- Typescript support
Currently documentation is under construction. Please chat on Discord if you want to ask any question.