Code Monkey home page Code Monkey logo

golang-templ-ssr's Introduction

Circle CI Go Templ practice


Golang SSE(Server Side Rendering) with HTMX, Golang, Golang Templ, TailwindCSS(Daisy UI)


Require

  • Node.js v18 or upper

  • Go 1.20 or upper

Project Setting

Visual Studio Code Setting

  1. templ-vscode

  2. Tailwind CSS Intellisense

Install Dependencies

  1. Node.js Dependencies

    npm install
    
    // or
    
    yarn install
    
  2. Golang Dependencies

    go mod download
    

Golang Templ

Document

  1. Install templ binary

    go install github.com/a-h/templ/cmd/templ@latest
    

Trobule shooting

Templ Extension

img

  1. Check if your go/bin directory registered to shell path

    // ZSH
    // Append following to the last line of ~/.zshrc
    
    export PATH=$PATH:$HOME/go/bin
  2. If temple binary are linked, command will be execute as under below

    img

Temple TailwindCSS Integrations

Document

By default VS Code will not trigger completions when editing "string" content, for example within JSX attribute values. Updating the editor.quickSuggestions setting may improve your experience

// VSCode settings.json

{
   ...

   "tailwindCSS.includeLanguages": {
    "templ": "html"
   },
   "editor.quickSuggestions": {
      "strings": "on"
   }

   ...
}

golang-templ-ssr's People

Contributors

j-hoplin avatar junho-yoon99 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.