pharaoh 0.0.6+1 pharaoh: ^0.0.6+1 copied to clipboard
Fast, unopinionated, minimalist web framework for Dart. Heavily inspired by ExpressJS
Examples #
API Service #
API service with a database access, secured with :api-key
using a Middleware on PATH: /api
and 3 has routes.
- GET:
/api/users
- GET:
/api/repos
- GET:
/api/user/:name/repos
Route Groups #
API service with two route groups /guest
and /admin
.
- Group:
/admin
- Group:
/guest
Middleware #
API service with Logger Middleware that logs every request that hits our server.
CORS with Shelf Middleware #
Add CORS to our Pharaoah server using shelf_cors_headers
Helmet with Pharaoh (Shelf Middleware) #
Use Helmet with Pharaoah shelf_helmet
Serve Webpages and Files 1 #
Serve a Webpage, and files using Pharaoh
Serve Webpages and Files 2 #
Serve a Webpage, favicon and Image using shelf_static