The console.dev web site implemented using HTML + Tailwind and hosted using a static Go server.
Launch with this command to inject the secret:
export NOTION_SECRET="op://Home/Notion API Key/credential" && op run -- code .
This will start VS Code with the secret set. You can reopen in the devcontainer and it will be available in the environment.
Start the development server which will watch for changes and rebuild the site automatically.
make dev
To build the site for production, run:
make build
- The site is built using Tailwind CSS. The CSS is generated automatically with
go generate
which runs thetailwindcss
command. - CSS is built from
static/css/input.css
combined with the Tailwind attributes in HTML to generate the finalstatic/css/output.css
file. - Build the Docker image with
docker build -t console.dev --load .
and run it withdocker run -t console.dev
.
The site is configured using environment variables:
PORT
: The port to listen on. Default is8080
.DEBUG
: Set totrue
to enable debug logging. Default isfalse
.JSON_LOGGER
: Set totrue
to log in JSON format. Default isfalse
.NOTION_SECRET
: API secret for Notion integration.