Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xkeshav/o_ho_no
A hono based repo with learning
https://github.com/xkeshav/o_ho_no
hono honojs jsx react typescript
Last synced: 13 days ago
JSON representation
A hono based repo with learning
- Host: GitHub
- URL: https://github.com/xkeshav/o_ho_no
- Owner: xkeshav
- License: mit
- Created: 2024-03-08T09:58:12.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-06-01T08:30:35.000Z (5 months ago)
- Last Synced: 2024-10-04T22:11:22.882Z (about 1 month ago)
- Topics: hono, honojs, jsx, react, typescript
- Language: TypeScript
- Homepage: https://xkeshav.github.io/o_ho_no/
- Size: 78.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hono Talk
This is related to hono talk to understand basic things about honojs.
## How to start
```sh
npm install
npm run dev
```and this will open [http://localhost:3000](http://localhost:3000)
## Web Page
[https://master.hono-fly.pages.dev/](https://master.hono-fly.pages.dev)
Note: using cloudflare adapter and uploaded from [separate repo](https://github.com/xkeshav/hono-fly)
## Examples
Here are few examples with honojs
### Text response
- endpoint: `/`
- use of `c.text()`### Custom Header
- endpoint: `/welcome`
- use of `c.header()` and `c.body()`### Multiple paths
- endpoint: `/hello` or `/hey` or `/hi`
- multiple path return same page; no redirect logic### JSON response
- endpoint: `/json/list`
- use of `c.json()` and `app.all()` route### HTML response
- endpoint: `/html/element`
- use of `c.html()`### CSS Support
- `/color/`
- `/color/rainbow`
### Path Params
- endpoint: `/color/white`
- add any valid color in place of _white_ as a path params### Query Params
- endpoint: `/color/white?sz=3`
- change font size with query params `sz`### JSX Support
- endpoint: `/alphabet`
- use of reusable component like react## Author
Keshav Mohta | [@xkeshav](https://www.xkeshav.com)