# Node Express PostgreSQL task tracker

A food truck launch board keeps permits, kitchen work, and marketing tasks moving in one place. Tokay runs the Express app as a Web Service with PostgreSQL, so every update survives the next deployment.

This project shows the shape of an app that has grown beyond a starter API. You get a browser interface and JSON routes over the same validated data, with the database schema committed beside the server.

## Facts

- Runtime: Node.js
- Framework: Express
- Service types: Web Service
- Resources: PostgreSQL
- Required secrets: None

## What it does

The board opens with launch tasks grouped across permits, kitchen work, and marketing.

Use **Every team**, **Every status**, or the search box to focus the list. Press **Move forward** to take a task from todo to doing, then to done.

The form adds a dated task to one of the three teams. Tasks you create also get a **Remove** button, while the starting examples stay available as useful reference work.

## Deploy it

Bring this folder to Tokay any way you like. Paste or upload it in the dashboard, push it with git, or hand it to your AI agent along with [our agent instructions](https://app.tokay.io/llms.txt). Tokay figures out the rest.

Working in Claude, ChatGPT, VS Code, or another MCP client? Connect the [Tokay MCP server](https://tokay.io/docs/platform-mcp) and ask your agent to deploy this example. It signs in through your browser, so there is no token to paste.

New to Tokay? The [getting started guide](https://tokay.io/getting-started) walks you through your first deploy.

## Finish setup in Tokay

The task tracker needs PostgreSQL to save your work. Tokay has already prepared the database setup based on the app. You only need to confirm where its `DATABASE_URL` should point.

1. Open the Service and choose **Environment**.
2. Under **From your infrastructure**, find `DATABASE_URL`.
3. Choose **Confirm database**.
4. Keep the suggested `app` name.
5. Choose **Confirm**.

Once `DATABASE_URL` is **Good to go**, continue through the deployment tracker. Tokay tests the committed database migration against a copy before the app receives traffic. Choose **Go Live** when the tracker offers it. Open the live URL from the finished Service to see the board.

## Try it

1. Move a kitchen task forward in the browser.
2. Replace the placeholder with your live URL and add another task through the API.

```sh
export APP_URL="https://your-app.tokay.app"
curl -X POST "$APP_URL/api/tasks" \
  -H 'Content-Type: application/json' \
  -d '{"title":"Order compostable bowls","tag":"kitchen","dueDate":"2026-08-10","status":"todo"}'
```

3. Refresh the board, then deploy again. Both changes remain because the page and API share PostgreSQL.

## How it works

Wondering how both interfaces stay together? The page and API call the same Express server and PostgreSQL tables. The server rejects invalid titles, dates, statuses, and filters before a write reaches the database.

The schema lives in a Graphile Migrate file beside the app. Tokay rehearses that migration against a copy before applying it, then the server adds any missing starter tasks after the tables are ready.

## Secrets

You do not need to provide a secret. Tokay supplies `DATABASE_URL` from the managed PostgreSQL database you confirm.

## Grow from here

Try the [React watchlist](/examples/node-vite-react-express-postgres-watchlist) when you want the same database setup behind a Vite interface.

## Source files

- [.gmrc](https://tokay.io/examples/src/node-express-postgres-task-tracker/.gmrc)
- [migrations/committed/000001-launch-board.sql](https://tokay.io/examples/src/node-express-postgres-task-tracker/migrations/committed/000001-launch-board.sql)
- [package.json](https://tokay.io/examples/src/node-express-postgres-task-tracker/package.json)
- [server.js](https://tokay.io/examples/src/node-express-postgres-task-tracker/server.js)

## Download and source

- [Download the complete project](https://tokay.io/examples/downloads/node-express-postgres-task-tracker.zip)
- Last updated: 2026-07-31
- Example revision: `52c7b7f`
- [View this revision on GitHub](https://github.com/tokayio/tokay-examples/tree/52c7b7ffd52e157375b08f1f11ff4fbe6c498642/node-express-postgres-task-tracker)
- [Deploy an app with a Postgres database](https://tokay.io/use-cases/deploy-app-with-postgres)
