Giter VIP home page Giter VIP logo

gohtmx's Introduction

gohtmx

Simple Go webserver serving up htmx

Local testing

export WEB_ROOT=$PWD
go run cmd/gohtmx/main.go
open http://localhost:8080/

Testing with containers

# Create VM
KIND_EXPERIMENTAL_PROVIDER=podman
podman machine init --cpus=4 --memory=4000 // adjust resources as needed

# Build container
podman build -t gohtmx:dev .

# Run
podman run -it --rm -p 8080:8080 localhost/gohtmx:dev 
open http://localhost:8080/

Deploy to test cluster

This can be use to test the app's chart

Create Cluster

This requires port 8080 and 8443 to be available on the host.

# Create VM and cluster
KIND_EXPERIMENTAL_PROVIDER=podman
podman machine init --cpus=4 --memory=4000 // adjust resources as needed
kind create cluster --config kind-confg.yaml

# Create and load image onto cluster nodes so we don't need a registry
podman save -o .temp/gohtmx.tar localhost/gohtmx:dev
kind load image-archive .temp/gohtmx.tar 

# Verify
# If you want to see the image you just loaded on the kind node
$ podman machine ssh
core@localhost:~$  podman exec -it <replace-me-with-container-id> /bin/bash
root@kind-worker:/# crictl images  

Deploy App

helm upgrade -i gohtmx charts/gohtmx
open http://gohtmx.127.0.0.1.nip.io:8080/

gohtmx's People

Contributors

tonygilkerson avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.