Loading…
Topic
Express
4 posts about Express. Every summary links to the original.
- 4 posts
- 3 companies
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
Newest first
Posts
Build a Video API with Twilio Programmable Video, Node.js, TypeScript, and Express
This tutorial builds an Express API for creating and managing Twilio Programmable Video rooms with Node.js and TypeScript. It sets up a project with Express, TypeScript 5, ts-node, node-dev, dotenv, and the Twilio Node.js helper library, while requiring Node.js 20 or 22 LTS. Twilio account credentials are stored in environment variables loaded from .env, which is excluded through .gitignore. The TypeScript configuration compiles strict CommonJS source from src into build and targets ES5; routes call the Rooms API to create rooms and complete them by changing status to completed, disconnecting connected participants. The result is a server-side room-management foundation, with access-token issuance identified as the next step for browser or mobile participants.
Secure Your Express App with OAuth 2.0, OIDC, and PKCE
Building authentication from scratch is risky and time-consuming, so the tutorial integrates Okta with an Express application using Passport, openid-client, OAuth 2.0, and OpenID Connect (OIDC). It creates a role-based expense dashboard in which users view spending data for their assigned teams, with team membership mapped from the email claim in the ID token. The setup uses Authorization Code Flow with PKCE, defined in RFC 7636, alongside express-session, EJS views, environment variables, and Okta redirect URI configuration. The sample project includes routes for login, logout, dashboard, profile, and team-specific expenses, while the running app displays these authenticated views. It concludes that OIDC supplies the identity layer over OAuth 2.0 and presents PKCE as a security baseline for server-side and browser-based web applications.
How to Get Going with the On
This workshop setup guide prepares a minimal Todo SaaS application for a series of enterprise-readiness workshops, while warning that the base app is not production quality and has intentional security shortcomings. It uses a React frontend, an Express API written in TypeScript, SQLite persistence, Prisma for ORM and database visualization, and an Nx workspace for shared project commands. Developers install Node.js v18 or higher, obtain the repository, run npm ci, seed two users with npm run init-db, and start the application with npm start. The frontend runs on localhost:3000, the API on localhost:3333, and Prisma Studio on localhost:5555 for inspecting users and todos. The guide concludes by directing developers to workshops covering OpenID Connect, SCIM, Terraform, Okta Workflows, and cross-application sign-out.
WebSockets and Fly
Fly supports WebSocket connections, and the post demonstrates that support with flychat-ws, a small chat application built from raw WebSockets and Express. Deployment requires cloning the example, running npm install, then using flyctl init, flyctl deploy, and flyctl open, with no application-specific configuration changes. Its fly.toml maps internal TCP port 8080 to HTTP port 80 and TLS/HTTP port 443, sets concurrency limits of 20 soft and 25 hard, and checks the service every 10 seconds with a two-second timeout. The Node server broadcasts each received message to every connected client, while the browser selects ws or wss from the served protocol and sends JSON messages. TLS terminates at Fly’s network edge, and the app can also run locally or in Docker.
Related topics
All topics →Weekly digest
The best engineering reads, once a week.