diff options
Diffstat (limited to 'source')
| -rw-r--r-- | source/index.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/index.js b/source/index.js index 472f7f1..6dc9ab9 100644 --- a/source/index.js +++ b/source/index.js @@ -1,12 +1,20 @@ import { Hono } from "hono"; import { cors } from "hono/cors"; +import { prettyJSON } from "hono/pretty-json"; +import { requestId } from "hono/request-id"; import service_status from "./library/service_status"; const app = new Hono(); // enable cors for all routes -app.use("*", cors()); +app.use(cors()); + +// pretty print json responses +app.use(prettyJSON()); + +// add a request id to all requests +app.use(requestId()); // return a simple hello world message app.get("/", (context) => { |
