Skip to content

Commit

Permalink
chore: clarification and package details
Browse files Browse the repository at this point in the history
  • Loading branch information
ernestmarcinko committed Oct 16, 2023
1 parent f72f5a2 commit 8f70f16
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
19 changes: 17 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
{
"name": "htmx-serverless",
"version": "0.1.0",
"description": "",
"description": "HTMX serverless XHR requests",
"main": "dist/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build:prod": "webpack --config webpack.config.ts --node-env=production",
"build:dev": "webpack --config webpack.config.ts --mode=development --watch"
},
"author": "",
"repository": {
"type": "git",
"url": "git+https://github.com/ernestmarcinko/htmx-serverless.git"
},
"keywords": [
"htmx without server",
"htmx",
"serverless",
"htmx no server",
"dom",
"htmx extension", "htmx plugin", "html"
],
"author": "Ernest Marcinko",
"license": "ISC",
"bugs": {
"url": "https://github.com/ernestmarcinko/htmx-serverless/issues"
},
"dependencies": {
"htmx.org": "^1.9.6"
},
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# HTMX Serverless requests ![npm](https://img.shields.io/npm/v/htmx-serverless) ![npm](https://img.shields.io/npm/dy/htmx-serverless) ![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)

To use HTMX you require some some sort of a back-end server to handle the XHR requests and responses. In some cases however it is nice to have only a client side interaction, **without a back-end server**.
To use HTMX you require a back-end server to handle the XHR requests and responses. In some cases it is nice to have only a client side interaction, **without a back-end server**.

This extension uses the HTMX built-in Events to intercept some XHR requests before they fire and define response texts on the client side. No need for mock or "fake" server scripts. It is **HTMX without a server** (sort of).

Expand All @@ -18,7 +18,7 @@ It is really simple:
<!-- htmx -->
<script src="https://unpkg.com/htmx.org"></script>
<!-- serverless extension -->
<script src="https://unpkg.com/htmx-serverless" defer></script>
<script src="https://unpkg.com/htmx-serverless"></script>
```

Then use the window.htmxServerless to set custom handlers and responses.
Expand Down

0 comments on commit 8f70f16

Please sign in to comment.