Overview
The Golang Full-stack Web App is a simple web application that allows users to save notes into a Sqlite database. It follows the minimalist approach of using only the standard Go library, with the exception of the necessary Sqlite driver. The application uses the “html/template” package for rendering HTML templates and the “</> htmx” JavaScript library for making backend requests without reloading the page.
Features
- CRUD functionality for saving notes to a Sqlite database.
- HTML template rendering using the “html/template” package.
- Backend requests (GET, POST, PATCH, DELETE) without page reloading using the “</> htmx” JavaScript library.
- Minimalist approach with no additional libraries beyond the standard Go library.
Installation
To install the Golang Full-stack Web App, follow these steps:
- Ensure you have Go installed on your machine.
- Install Air for hot reloading when editing code.
- Install NodeJs.
- Run the following NodeJs commands in the project root:
npm install tailwindcss npm install postcss-cli npm install autoprefixer - To make code changes or create production CSS, run the following commands:
npx tailwindcss init npx tailwindcss -o static/css/tailwind.css npm run build - Start the application in development mode by running the command:
air
Summary
The Golang Full-stack Web App is a simple web application that allows users to save notes into a Sqlite database. It follows the minimalist approach of using only the standard Go library and utilizes the “html/template” package for rendering HTML templates. With the “</> htmx” JavaScript library, the application enables backend requests without reloading the page, providing a smoother user experience. Overall, this application provides a lightweight and efficient solution for managing and saving notes in a web environment.