Simple Express app

👉 Closed beta notice

The full framework is currently part of Tessl’s closed beta program. You can request access here.

You can use Tessl to create spec-driven applications from scratch! Starting with a basic spec for an app gives you an easy template to expand upon, building up useful context along the way.

In this example, we'll create a simple one-page Express app using the Tessl MCP server via Claude Code.

With Tessl initialized, and Claude Code set up, we're able to drive this process with a simple prompt:

Claude Code will invoke the create MCP tool, which will give us a simple starter spec.

Example spec for a simple Express app
# Hello World Express Server

A simple Express.js application that serves a "Hello World!" message on the root route.

## Target

[@generate](../../src/hello-world/hello-world.js)

## Capabilities

### Starts HTTP server on port 3000

- Server starts successfully and listens on port 3000

### Serves Hello World message on root route

- GET request to "/" returns "Hello World!" with status 200

### Handles errors gracefully

- Server handles unexpected errors without crashing

## API

```javascript { .api }
// Express application instance
const app = express();

// Start server function - returns the HTTP server instance synchronously
function startServer(port = 3000); // Returns server object with .close(), .on(), .listening properties

// Root route handler
app.get('/', (req, res) => {
  // Returns "Hello World!" message
});

// Error handling middleware
app.use((err, req, res, next) => {
  // Handles errors gracefully
});
```

## Dependencies { .dependencies }

### Express.js Framework { .dependency }

Web framework for Node.js to handle HTTP requests and responses.
[@use](express)

At this point, you can ask Claude Code to build your spec — if it hasn't already!

Once you’ve got the initial spec, you can:

  • Add a new route

  • Add middleware

  • Expand test cases

  • Integrate with other services, like DBs, queues, or APIs

Simply ask Claude to add any of these things to the spec for you, or to create related specs. Claude will invoke the edit tool to update your spec, and build for you when you want to try out the changes yourself.

There are many ways to scaffold an app, but approaching it in a spec-driven way means that our spec stays the source of truth, even between agent sessions.

Last updated