A simple web app using Go, HTMX and Tailwind CSS
This guide assumes you have Go and Node.js installed already.
-
Clone the repository: Open a command prompt and run:
git clone https://github.com/chemistry-software/chemistry-software-htmx-go.git cd chemistry-software-htmx-go -
Install npm dependencies: In the project directory, run:
npm install
This will install Tailwind CSS and other necessary development tools.
-
Run the development server: In the project directory, run:
npm run dev
This command starts both the Go backend server and the Tailwind CSS build process in development mode.
-
Clone the repository: Open a terminal and run:
git clone https://github.com/chemistry-software/chemistry-software-htmx-go.git cd chemistry-software-htmx-go -
Install npm dependencies: In the project directory, run:
npm install
This will install Tailwind CSS and other necessary development tools.
-
Run the development server: In the project directory, run:
npm run dev
This command starts both the Go backend server and the Tailwind CSS build process in development mode.
After running the development server with npm run dev, navigate to http://localhost:8080 in your web browser.
Developing and Making Changes
- Go Backend: Modify the Go files (
.go) in the project. The server should automatically restart when you save changes. - HTML Templates: Edit the HTML templates in the
templates/directory (.html). Refresh your browser to see changes. - CSS Styling: Edit
static/css/input.css. Tailwind CSS will automatically rebuildstatic/css/tailwind.cssand your browser should hot-reload the CSS changes. - JavaScript: Modify JavaScript files in
static/js/. Refresh your browser to see changes.
Important Notes:
- Node.js and npm are required to build the CSS with Tailwind CSS. They are only needed during development, not for running the final Go application.
- The
npm run devcommand starts both the Go server and the Tailwind CSS builder concurrently, making development easier. - Make sure you have Go and Node.js installed and configured correctly before starting.
Copyright 2025 chemistry.software
Licensed under the MIT License.