Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sombriks/sample-htmx-koa
sampling htmx using nodejs ecosystem
https://github.com/sombriks/sample-htmx-koa
ava htmx knexjs koajs nodejs nunjucks sqlite3 study-project supertest
Last synced: about 1 month ago
JSON representation
sampling htmx using nodejs ecosystem
- Host: GitHub
- URL: https://github.com/sombriks/sample-htmx-koa
- Owner: sombriks
- License: mit
- Created: 2024-02-25T19:27:35.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-02-29T23:27:29.000Z (11 months ago)
- Last Synced: 2024-10-16T19:12:17.627Z (3 months ago)
- Topics: ava, htmx, knexjs, koajs, nodejs, nunjucks, sqlite3, study-project, supertest
- Language: JavaScript
- Homepage:
- Size: 126 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [sample-htmx-koa][repo]
Sampling htmx using nodejs ecosystem so i can compare with [this one][other].
## How to run
```bash
npm install
npm run dev
```## How to test
```bash
npm install
npm run coverage
```Check the small todo list on
## Noteworthy
- [Koa][koa] has a nice [render/view middleware][koa-view] supporting a lot of
[templating languages][temp-langs].
- [Nunjucks][njk] was chosen by no special reason except the good documentation.
It is superior to velocity in some ways, but the point isn't that but show how
[htmx][htmx] behaves well with literally any server side templating engine.
- Thanks to [koa-bodyparser][body-parser] the ui sends form data to controller
and tests send json yet no problem due the simple nature of data. The
middleware does the conversion in a very transparent way. I might need to
improve testcase in future to send form data as well.## Next steps
- [X] ~~better logging~~ we configured [cabin][cabin]/[signale][signale]
- [X] write tests with [ava][ava]
- [ ] field to search for todos
- [ ] detailed comparison with javalin version
- [ ] docker
- [ ] other database engine[repo]: https://github.com/sombriks/sample-htmx-koa
[other]: https://github.com/sombriks/sample-htmx-javalin
[koa]: https://koajs.com/
[koa-view]: https://github.com/ladjs/koa-views
[temp-langs]: https://github.com/tj/consolidate.js#supported-template-engines
[njk]: https://mozilla.github.io/nunjucks/getting-started.html
[htmx]: https://htmx.org
[cabin]: https://cabinjs.com
[signale]: https://github.com/klaudiosinani/signale
[ava]: https://github.com/avajs/ava
[body-parser]: https://github.com/koajs/bodyparser