https://htmx.org logo
Join Discord
Powered by
# htmx-general
  • t

    thankful-apartment-66679

    11/11/2022, 9:51 PM
    @bitter-machine-55943 chalice is a project that's used throughout the development lifecycle. youre able to start a dev server locally and it will generally behave the same way that the stack that gets deployed to aws will. eventually you can use it to deploy, which (iirc) it generates a cloudformation definition that is used to manage the objects (api gateway, lambdas, roles, any other stuff that you define like dynamodb tables)
  • t

    thankful-apartment-66679

    11/11/2022, 9:52 PM
    in fairness i havent used it for a project at any kind of scale, and id personally opt to use something like aws app runner instead of api gateway + lambda unless you were looking to use some advanced features of api gateway like using cognito for authn
  • a

    ancient-shoe-86801

    11/11/2022, 9:53 PM
    I've tried chalice before, but this time I wanted to develop a "vanilla Flask" app. This allows me that if tomorrow I want to deploy it in a different platform, or dockerize it, or whatever, I am not tied to anything.
  • t

    thankful-apartment-66679

    11/11/2022, 9:54 PM
    yeah, when you decide to go all in with api gateway and lambda, theres not a good way to go back
  • t

    thankful-apartment-66679

    11/11/2022, 9:54 PM
    portability for the app server is still pretty important imo
  • t

    thankful-apartment-66679

    11/11/2022, 10:11 PM
    ive been considering a POC that uses falcon + jinja + dynamodb + htmx in aws app runner
  • b

    bitter-machine-55943

    11/11/2022, 10:23 PM
    Yeah there’s a way to run a Django app from an Azure Function but it seems…wasteful, or something. Like it wouldn’t use the HTTP or routing parts. So I could just pick a templating and ORM library (or just write SQL). But maybe there’s a benefit to keeping it as a Django app (or Flask, or whatever) so it’s simpler to move if needed.
  • t

    thankful-apartment-66679

    11/11/2022, 10:26 PM
    yeah, definitely. lambda isnt really my preferred tool for web application hosting. it's really good for processing stream data or queue tasks, but (imo) a good old fashioned web server is still the best option for the actual web app
  • t

    thankful-apartment-66679

    11/11/2022, 10:27 PM
    the dev experience of writing a web app that will eventually get deployed to api gateway + lambda feels like way too much. feels like a front end javascript project using one of those newfangled component frameworks to me
  • b

    bitter-machine-55943

    11/11/2022, 10:29 PM
    But I feel like there should be a better model. That article about Quart+SSE+HTMX got me thinking. Like maybe it’s not a library per se, but something like HTMX+SSE+? would fit well into serverless
  • b

    bitter-machine-55943

    11/11/2022, 10:30 PM
    Maybe AWS is different but Azure Functions feel basically like writing a Flask app. Not exactly, but it’s basically HTTP route runs a function
  • t

    thankful-apartment-66679

    11/11/2022, 10:35 PM
    ya, its pretty much the same. its just a preference for me. i like building web services that can be composed into a single shippable artifact (eg: a docker image)
  • t

    thankful-apartment-66679

    11/11/2022, 10:36 PM
    for SSE, i think a web process that's subscribed to a cloud service like eventbridge (in AWS) or cloud pub/sub (in GCP) can deliver those events to the front end. the web app is still a docker container running somewhere
  • p

    plain-church-24039

    11/12/2022, 12:03 AM
    Hi there 👋
  • b

    brainy-ice-92385

    11/12/2022, 12:26 AM
    @bitter-machine-55943 I have successfully used Netlify Functions which are just AWS Lambdas wrapped up to be simpler to deploy. I used vanilla TS and just manually render EJS templates in the response. Ezpz with htmx. Will be doing more of this in the future for sure
  • r

    refined-waiter-90422

    11/12/2022, 4:55 AM
    the jquery peopls are too busy shipping to get a channel
  • r

    refined-waiter-90422

    11/12/2022, 4:56 AM
    too busy riding lambos
  • m

    modern-wall-92403

    11/12/2022, 8:18 AM
    I have a htmx element like this: . When I trigger "reload_wishes" in the response headers without any content in the div, the trigger is not activated... It is only when content has been fetched already (e.g. on page load) that the trigger works. Any idea what setting to change?
  • m

    modern-wall-92403

    11/12/2022, 8:24 AM
    never mind, stupid mistake somewhere else
  • t

    thankful-addition-60522

    11/12/2022, 4:14 PM
    Dude, where's my Lambo 😠
  • m

    miniature-lizard-24702

    11/12/2022, 5:49 PM
    https://tenor.com/view/lambo-cardboard-4pf-car-gif-18360541
  • b

    busy-tomato-43957

    11/12/2022, 6:11 PM
    wow that's awesome actually
  • b

    busy-tomato-43957

    11/12/2022, 6:12 PM
    so I'm trying to recreate todomvc with htmx (because I want to) and I have an input like this:
    <input name="new-todo" placeholder="What needs to be done?" autofocus hx-post="/todos;add" hx-target=".todo-list" hx-swap="afterbegin" />
  • b

    busy-tomato-43957

    11/12/2022, 6:13 PM
    I've got it to successfully return the new fragment and insert it in the correct location, but I'd like to clear the input as well. can you do that?
  • m

    mysterious-toddler-20573

    11/12/2022, 6:14 PM
    If you don’t want to target the input for replacement you’ll need to clear it with scripting
  • b

    busy-tomato-43957

    11/12/2022, 6:15 PM
    ok
  • s

    shy-zebra-22292

    11/12/2022, 6:16 PM
    i wonder if it is possible to replace the input too... with hx-swap-oob https://htmx.org/attributes/hx-swap-oob/
  • s

    shy-zebra-22292

    11/12/2022, 6:17 PM
    i am like 2 days into htmx, don't trust me, you gotta try it to prove it works 😄 😅
  • b

    busy-tomato-43957

    11/12/2022, 6:19 PM
    worth giving a whirl. thanks for the idea, I wasn't aware of hx-swap-oob
  • s

    shy-zebra-22292

    11/12/2022, 6:20 PM
    tell me if it works out, would ya? 😄
1...902903904...1146Latest