A full stack web application using net/http, database/sql and html/template.
Install development tools.
The following tools are used in this project:
Run the task below to install them:
task tools
Copy .env.example to .env.
cp .env.example .env
Set the environment variables in .env according to your setup.
If using podman, change CONTAINER variable to podman.
Start the database.
task db
Run database migrations.
task migrate
Bundle the css files.
Open a new terminal and run the css:watch task.
task css:watch
Bundle the javascript files.
Open a new terminal and run the js:watch task.
task js:watch
Start the application.
task dev
Interact with the application.
Open your browser on localhost:8888.
An api is also available at the /api endpoint.
First, setup the test environment:
task setup_test
You just need to run this once per terminal session.
Then, run the tests:
task test