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.
3f5182cCreate 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 |
Copy a source-pinned command for your client. You run it yourself.
Destination: .claude/skills/nodejs-express-server · pinned to the source commit
git clone https://github.com/aj-geddes/useful-ai-prompts.git
cd useful-ai-prompts
git checkout 3f5182cfd739fc113f4af5244a1cf342ad7f7911
mkdir -p ".claude/skills/nodejs-express-server"
cp -r "skills/nodejs-express-server" ".claude/skills/nodejs-express-server"Review the source before running. This copies files into your project; it is not a one-click install and does not verify runtime safety.
Scanner static-checks@0.1.0 · commit 3f5182cfd739. Static checks cannot prove runtime safety – review the source and the exact diff before installing. How checks work.
References credentials, tokens or secret files that a skill should not need.
Evidence: [redacted]· fingerprint e9cbb0224c4a3d23