Insights provides real-time analytics for web applications, without impacting site performance.
Before you begin, ensure you have the following installed:
- Docker
- Git
The development environment is provided by containers.
git clone git@github.com:dayvidwhy/insights.git
cd insights
docker-compose up --build
docker exec -it insights-app bash
Copy the example env file and update the variables.
cp .env.example .env
Build and run the server:
go build -o bin/server server.go
./bin/server
Or with go run:
go run server.go
Server will be available at localhost:1323
on your machine.
For an optimized development experience, attach VSCode to the running insights-app container:
- Use the command palette (Ctrl+Shift+P or Cmd+Shift+P on Mac) and select:
>Dev Containers: Attach to Running Container...
- Choose /insights-app from the list.
VSCode will recommend the Go extension when you open a .go
file.