prism 2.0.0
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
- WebSockets support
- Context actions, redirects, etc...
- Static file server 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.
- 2.0.0 released 11 days ago
- navid-m/prism
- GPL-3.0
- Copyright © 2025, Navid M
- Authors:
- 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 - Download Stats:
-
-
0 downloads today
-
1 downloads this week
-
5 downloads this month
-
5 downloads total
-
- Score:
- 0.2
- Short URL:
- prism.dub.pm