Azure PostgreSQL for TypeScript
Connects Node.js and TypeScript applications to Azure Database for PostgreSQL with secure authentication and robust connection pooling.
This skill provides a comprehensive set of patterns and boilerplate for integrating Node.js and TypeScript applications with Azure Database for PostgreSQL Flexible Server. It includes high-quality implementations for both standard password and modern Microsoft Entra ID (passwordless) authentication using the @azure/identity package. By leveraging the industry-standard pg (node-postgres) package, it ensures developers follow best practices for connection pooling, type-safe queries, transaction management, and secure parameterization to prevent SQL injection in enterprise environments.
Key Features
01Provides type-safe query patterns using TypeScript generics
02Implements production-ready connection pooling with automatic token refresh
03Offers detailed error handling for specific PostgreSQL database codes
04Supports both Password and Microsoft Entra ID (passwordless) authentication
05Includes robust transaction management with helper functions
060 GitHub stars
Use Cases
01Managing high-concurrency database connections in serverless or containerized environments
02Building secure, enterprise-grade backends on Azure using Node.js and TypeScript
03Migrating existing PostgreSQL applications to Azure with passwordless authentication