skills/nodejs-express-server/SKILL.md
Build production-ready Express.js servers with middleware, authentication, routing, and database integration. Use when creating REST APIs, managing requests/responses, implementing middleware chains, and handling server logic.
npx skillsauth add aj-geddes/useful-ai-prompts nodejs-express-serverInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create robust Express.js applications with proper routing, middleware chains, authentication mechanisms, and database integration following industry best practices.
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}`);
});
Detailed implementations in the references/ directory:
| Guide | Contents | |---|---| | Basic Express Setup | Basic Express Setup | | Middleware Chain Implementation | Middleware Chain Implementation | | Database Integration (PostgreSQL with Sequelize) | Database Integration (PostgreSQL with Sequelize) | | Authentication with JWT | Authentication with JWT | | RESTful Routes with CRUD Operations | RESTful Routes with CRUD Operations | | Error Handling Middleware | Error Handling Middleware | | Environment Configuration | Environment Configuration |
development
Implement Zero Trust security model with identity verification, microsegmentation, least privilege access, and continuous monitoring. Use when building secure cloud-native applications.
development
Prevent Cross-Site Scripting (XSS) attacks through input sanitization, output encoding, and Content Security Policy. Use when handling user-generated content in web applications.
tools
Create wireframes and interactive prototypes to visualize user interfaces and gather feedback early. Use tools and techniques to communicate design ideas before development.
development
Implement real-time bidirectional communication with WebSockets including connection management, message routing, and scaling. Use when building real-time features, chat systems, live notifications, or collaborative applications.