Skip to content

Add the API's front door: start it, bind localhost, tie it to firstmate's session #27

Closed

Description

@EvanAgee

Parent

#26

What to build

The API server exists and lives with firstmate. Firstmate starts it on its own startup and stops it at teardown, the server binds to localhost only, and it reads its port and firstmate home from firstmate's config with no hardcoded paths. It answers a health check that names its version and the home it serves. This ticket also builds the test seam every later ticket uses: a throwaway firstmate home with fixture folders, the server started against it on an ephemeral port, and tests that speak real HTTP.

Acceptance criteria

  • Starting firstmate brings the API up; teardown takes it down with it
  • The server answers only on localhost
  • Port and home come from firstmate config; another machine's layout works
  • A health endpoint reports version and the served home
  • Tests run against a throwaway home over real HTTP, under the repo's normal test entry point
  • Node built-ins only, no new dependencies

Blocked by

None (can start immediately).

Activity

  1. added
    ready-for-agent
    on Aug 26, 2026
  2. removed
    ready-for-agent
    on Aug 26, 2026
  3. changed the title [-]API ticket 1: open the front door[/-] [+]Add the API's front door: start it, bind localhost, tie it to firstmate's session[/+] on Aug 27, 2026
  4. EvanAgee commented on Aug 27, 2026

    @EvanAgee
    OwnerAuthor

    Done. The API starts and stops with firstmate, binds 127.0.0.1 only, and is tied to firstmate's session (bin/fm-api.sh, bin/fm-api-server.mjs on main).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions