Crates.io | hxql |
lib.rs | hxql |
version | 0.1.2 |
source | src |
created_at | 2024-06-22 20:35:40.177089 |
updated_at | 2024-06-23 03:01:16.391583 |
description | Easily build dynamic apps with HTMX, GraphQL, and Handlebars. |
homepage | |
repository | |
max_upload_size | |
id | 1280685 |
size | 74,011 |
Start and run a dynamic web app with this cli. Centered around htmx, paired with GraphQL, and built with rust - hxql is a cli that can be used to start, run, and interface with an hxql app.
Currently this app is in the early planning stages. For examples, check out the starter repo - https://github.com/The-Devoyage/hxql-starter
Hxql is a web framework and design pattern implementation. It is built around GraphQL and Htmx, an unlikely duo that can come together to create a delightfuly simple and versatile, and dynamic development experience.
Htmx is commonly associated with static or server side rendered apps which serve up pre-rendered html content. On the other hand, apps centered around GraphQL typically receive serialized data such as JSON which is injected into "templates" or components client side.
For this reason, utilizing these two technologies together becomes a anti-pattern. Delivering pre-renndered content kind of contridicts the need for templated variable injection client side.
Hxql ties together modern and familair technologies to create a seamless development experience based on this "anti-pattern".
index.html
.cargo install hxql
hxql init --name <APP_NAME>
Creates a directory with a ready to run web application.
hxql start <OPTIONS>
init
- Clones the hxql starter into a custom named folder and a base subgraph configuration.
--name
- Specify a name for your hxql app.start
- Reads the hxql.toml
file and uses docker (subgraph) to start the web server.
--port
- Specifies a port to run the server on.--host
- Binds the port to all network interfaces.--graphql
- Point to the GraphQL Server providing hydration for the hxql app.--enable-hydrate
- Toggle hydration settings. On by default.