Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.
/ Promethium Public archive

Tiny web framework with routing ability for deno.

License

Notifications You must be signed in to change notification settings

amatsagu/Promethium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Promethium

DeepScan grade Github license badge Maintenance badge

Zero dependency, tiny web framework with routing included.

Why would you use it?

  • 💪 Built on native, Deno's TCP server (v. high performance).
    • ⮤ Up to 9x times faster than Oak framework!
  • 🗺️ Supports both static & dynamic routing (string or regex).
  • ♻️ Uses default Request & Response structs which are part of fetch API (no extra abstraction).
  • 📦 Comes with optional support for quick rendering of any static files, raw text, json & html documents. Those modules won't be loaded by default - you have to import helpers.ts file in order to access them.

Quick performance check

Click to see quick benchmark results!
Native Web Server Promethium Web Framework
https://raw.githubusercontent.com/Amatsagu/Promethium/master/.github/native_benchmark.png https://raw.githubusercontent.com/Amatsagu/Promethium/master/.github/Promethium_benchmark.png
Avg. 40.97K req/sec Avg. 40.56K req/sec

The code comes from https://github.com/denoland/deno_std/blob/main/http/bench.ts. Promethium version had the same code attached to "/" route.


Example usage

Example app usage

Contributing

  1. Fork it!
  2. Modify project to your like.
  3. Test it! deno test --allow-net --allow-read --unstable
  4. Create your feature branch: git checkout -b my-new-feature
  5. Commit your changes: git commit -am 'Add some feature'
  6. Push to the branch: git push origin my-new-feature
  7. Submit a pull request :D