---
title: "Build a REST API with Express, TypeScript, and Deno, pt. 2"
description: "An Express REST API running on Deno gets integration tests via Deno.test using fetch against a configurable staging URL, and HTTP latency benchmarks via Deno.bench in a _bench file."
url: "https://swe.quest/articles/build-a-rest-api-with-express-typescript-and-deno-pt-2-e71cec39c5b23268"
canonical: "https://deno.com/blog/build-api-express-typescript-pt2"
source: "Deno"
published: "2023-04-06"
difficulty: "medium"
kind: "How-to"
reading_minutes: 4
tags: ["typescript","testing","containers","api-design"]
---

# Build a REST API with Express, TypeScript, and Deno, pt. 2

A post on [Deno](https://swe.quest/sources/deno.md), published 2023-04-06, 4 min read, How-to. Original: [https://deno.com/blog/build-api-express-typescript-pt2](https://deno.com/blog/build-api-express-typescript-pt2)

## Summary

An Express REST API running on Deno gets integration tests via Deno.test using fetch against a configurable staging URL, and HTTP latency benchmarks via Deno.bench in a \_bench file. The service is then containerized with a Dockerfile that runs deno cache and a deno.jsonc start task, launched with docker compose, and tested and benchmarked against the running container. Commenting out verbose request logging in middleware noticeably improves benchmark results, and deno bench --json can export results for automated tracking.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [TypeScript](https://swe.quest/tags/typescript.md) (Languages)
- [Testing](https://swe.quest/tags/testing.md) (Engineering practices)
- [Containers](https://swe.quest/tags/containers.md) (Infrastructure)
- [API design](https://swe.quest/tags/api-design.md) (Backend & APIs)

## Prerequisites

- Express routing basics ([easy posts on Maps & geospatial](https://swe.quest/tags/geospatial.md?difficulty=easy))
- TypeScript basics ([easy posts on TypeScript](https://swe.quest/tags/typescript.md?difficulty=easy))
- Docker Compose ([easy posts on Containers](https://swe.quest/tags/containers.md?difficulty=easy))

## Keywords

Deno, Express, Docker, Deno.test, Deno.bench, docker compose

## Related posts

- [Build a REST API with Express, TypeScript, and Deno](https://swe.quest/articles/build-a-rest-api-with-express-typescript-and-deno-803b55a783fab19e.md): Deno · 2023-03-08 · Medium · 5 min read · TypeScript, JavaScript, API design, Runtimes & VMs
  Deno runs Express with TypeScript without any TypeScript build configuration: Express is imported through an npm: specifier and its types are pulled in with a @deno-types comment.
- [Build a Cross-Platform CLI with Deno in 5 minutes](https://swe.quest/articles/build-a-cross-platform-cli-with-deno-in-5-minutes-fef7ea1fb4bc76d2.md): Deno · 2023-09-01 · Medium · 9 min read · TypeScript, Developer tools, JavaScript, Testing
  Deno's built-in tooling covers the full path to a small cross-platform CLI, shown here by building \`greetme-cli\`.
- [Build a dinosaur runner game with Deno, pt. 1](https://swe.quest/articles/build-a-dinosaur-runner-game-with-deno-pt-1-e4d3faa91fec67fd.md): Deno · 2025-12-08 · Medium · 5 min read · JavaScript, TypeScript, Deployment, Serverless
  Part one of a series building a browser dinosaur runner game sets up a Deno project that serves static files and deploys it.
- [Build Apps in Deno with Frameworks such as React, Vue, Express, and more.](https://swe.quest/articles/build-apps-in-deno-with-frameworks-such-as-react-vue-express-and-more-c17610b126d7b402.md): Deno · 2022-11-16 · Medium · 11 min read · JavaScript, Frontend, React, TypeScript
  Deno 1.28's npm support lets you use npm-distributed frameworks like Express, React and Vue directly via \`npm:\` specifiers.
- [Build a Typesafe API with tRPC and Deno](https://swe.quest/articles/build-a-typesafe-api-with-trpc-and-deno-9411ac01cbda8497.md): Deno · 2024-11-19 · Medium · 7 min read · TypeScript, RPC & gRPC, API design, JavaScript
  tRPC lets a Deno server and client share types through an exported router type, with no schema declarations or code generation.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
