Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
aj-geddes avatar

Nodejs Express Server

  • 3k installs
  • 305 repo stars
  • Updated March 4, 2026
  • aj-geddes/useful-ai-prompts

nodejs-express-server is an agent skill that guides production Express.js REST API setup with middleware chains, JWT authentication, Sequelize PostgreSQL integration, and structured error handling.

About

The nodejs-express-server skill documents how to build production-ready Express.js servers with routing, middleware chains, authentication, database integration, and centralized error handling. It opens with a minimal working server using express.json and express.urlencoded middleware, a /health route, and error middleware that returns JSON with requestId and status codes. Reference guides in references/ cover basic Express setup, middleware chain implementation, PostgreSQL integration with Sequelize, JWT authentication, RESTful CRUD routes, error-handling middleware, and environment configuration. Documented best practices include async await in route handlers, input validation before processing, rate limiting, HTTPS in production, logging, and keeping route handlers small. Anti-patterns warn against silent errors, storing secrets in code, synchronous route work, callback hell, exposing stack traces, and trusting client-side validation alone. Developers reach for it when creating REST APIs, wiring cross-cutting middleware, protecting routes with JWT, or connecting Express to PostgreSQL through Sequelize.

  • Minimal Express template with JSON body parsing, health route, and centralized JSON error middleware.
  • Reference guides for Sequelize PostgreSQL, JWT auth, CRUD routes, and environment configuration.
  • Best practices cover async await routes, input validation, rate limiting, and HTTPS in production.
  • Anti-patterns flag silent errors, secrets in code, callback hell, and exposed stack traces.
  • Structured references/ directory splits middleware, database, auth, and error topics into focused guides.

Nodejs Express Server by the numbers

  • 3,041 all-time installs (skills.sh)
  • +35 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #189 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
  • Security screen: HIGH risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

nodejs-express-server capabilities & compatibility

Capabilities
express middleware chain patterns · jwt authentication route protection · sequelize postgresql database integration · restful crud route templates · centralized json error handling
Use cases
api development · database
From the docs

What nodejs-express-server says it does

Build production-ready Express.js servers with middleware, authentication, routing, and database integration.
SKILL.md
Use middleware for cross-cutting concerns
SKILL.md
Database Integration (PostgreSQL with Sequelize)
SKILL.md
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill nodejs-express-server

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs3k
repo stars305
Security audit2 / 3 scanners passed
Last updatedMarch 4, 2026
Repositoryaj-geddes/useful-ai-prompts

How do I structure an Express.js REST API with middleware, JWT auth, database integration, and safe error responses?

Scaffold production Express.js REST APIs with middleware chains, JWT auth, Sequelize PostgreSQL integration, and structured error handling.

Who is it for?

Developers standing up Node.js REST APIs who need middleware, JWT auth, and PostgreSQL Sequelize integration patterns.

Skip if: Skip when you need a non-Express Node framework or only client-side JavaScript without a server.

When should I use this skill?

User asks to build Express REST APIs, implement JWT middleware, connect Sequelize PostgreSQL, or structure error-handling middleware.

What you get

A production-oriented Express server layout with reference guides for middleware, Sequelize, JWT routes, and error handling patterns.

  • Express server template
  • Middleware and auth reference patterns

By the numbers

  • JWT tokens expire in 24h per included generateToken implementation
  • Covers jsonwebtoken, bcrypt, and PostgreSQL User model patterns

Files

SKILL.mdMarkdownGitHub ↗

Node.js Express Server

Table of Contents

Overview

Create robust Express.js applications with proper routing, middleware chains, authentication mechanisms, and database integration following industry best practices.

When to Use

  • Building REST APIs with Node.js
  • Implementing server-side request handling
  • Creating middleware chains for cross-cutting concerns
  • Managing authentication and authorization
  • Connecting to databases from Node.js
  • Implementing error handling and logging

Quick Start

Minimal working example:

const express = require("express");
const app = express();
const PORT = process.env.PORT || 3000;

// Middleware
app.use(express.json());
app.use(express.urlencoded({ extended: true }));

// Routes
app.get("/health", (req, res) => {
  res.json({ status: "OK", timestamp: new Date().toISOString() });
});

// Error handling
app.use((err, req, res, next) => {
  console.error(err.stack);
  res.status(err.status || 500).json({
    error: err.message,
    requestId: req.id,
  });
});

app.listen(PORT, () => {
  console.log(`Server running on port ${PORT}`);
});

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
Basic Express SetupBasic Express Setup
Middleware Chain ImplementationMiddleware Chain Implementation
Database Integration (PostgreSQL with Sequelize)Database Integration (PostgreSQL with Sequelize)
Authentication with JWTAuthentication with JWT
RESTful Routes with CRUD OperationsRESTful Routes with CRUD Operations
Error Handling MiddlewareError Handling Middleware
Environment ConfigurationEnvironment Configuration

Best Practices

✅ DO

  • Use middleware for cross-cutting concerns
  • Implement proper error handling
  • Validate input data before processing
  • Use async/await for async operations
  • Implement authentication on protected routes
  • Use environment variables for configuration
  • Add logging and monitoring
  • Use HTTPS in production
  • Implement rate limiting
  • Keep route handlers focused and small

❌ DON'T

  • Handle errors silently
  • Store sensitive data in code
  • Use synchronous operations in routes
  • Forget to validate user input
  • Implement authentication in route handlers
  • Use callback hell (use promises/async-await)
  • Expose stack traces in production
  • Trust client-side validation only

Related skills

How it compares

Express API reference pack with Sequelize and JWT guides, not a generic Node tutorial.

FAQ

What does nodejs-express-server cover?

Express routing, middleware chains, JWT authentication, Sequelize PostgreSQL integration, CRUD routes, and error-handling middleware.

When should I use nodejs-express-server?

When building REST APIs, managing request handling, implementing middleware, or connecting Express to a database.

Is Nodejs Express Server safe to install?

skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.