Install templ and air locally on your machine:
go install github.com/a-h/templ/cmd/templ@latest
go install github.com/cosmtrek/air@latest
Make sure go binary are exported to the path:
export PATH="$HOME/go/bin:$PATH"
Install nodejs and npm to be able to use the tailwind compiler: Personally I install nodejs using nvm or fvm.
Install tailwind and tailwind plugins:
npm i
Generate tailwind css from templates:
npm run tailwind:build
For more info about tailwind check https://tailwindcss.com/docs/installation
Install ffmpeg for transcoding mp4 video to HLS format
brew install ffmpeg
Use make to build or run the application:
make build
make run
Generate templ and tailwind:
make generate
Use air to launch the hot reloading mode:
air
Basic features (MVP)
Sometimes when killing the dev server does not kill the port 3000. For the moment kill it manually
lsof -i:3000
pkill pid
or
kill -9 pid