prism 1.0.9

Performant, modern web framework


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

Usage

auto app = new PrismApplication(2000);

app.get("/", (context) => html("<h1>Hello</h1>"));

app.post("/submit", (context) => json(`{"received": true}`));

app.run();

Features

  • Fluent and intuitive URL routing
  • WebSocket support
  • Static file serving middleware
  • Full support for HTTP methods: GET, POST, PUT, PATCH, DELETE
  • Automatic handling of all MIME types

Route Parameters

Supports routes like:

app.get("/users/:id", (context) {
    auto id = context.params["id"];
    return text("User ID: " ~ id);
});

Query Parameters

app.get("/search", (context) {
    auto q = context.query.get("q", "");
    return text("Search query: " ~ q);
});

Response Types

html("<h1>HTML</h1>");
json(`{"key": "value"}`);
text("Plain text");
blob([0x42, 0x69, 0x6E, 0x61, 0x72, 0x79]);

Navid M © 2025

No warranty. Not ever.

Authors:
  • Navid M
Dependencies:
none
Versions:
2.1.2 2025-Jun-01
2.1.1 2025-Jun-01
2.1.0 2025-Jun-01
2.0.0 2025-Jun-01
1.1.0 2025-May-31
Show all 17 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 3 downloads this month

  • 5 downloads total

Score:
0.2
Short URL:
prism.dub.pm