ever-co/ever-works / .agents/skills/nodejs-express-server
nodejs-express-server
VerifiedBuild 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.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 3.8 KB |
| references/authentication-with-jwt.md | markdown | 790 B |
| references/basic-express-setup.md | markdown | 616 B |
| references/database-integration-postgresql-with-sequelize.md | markdown | 756 B |
| references/environment-configuration.md | markdown | 440 B |
| references/error-handling-middleware.md | markdown | 834 B |
| references/middleware-chain-implementation.md | markdown | 979 B |
| references/restful-routes-with-crud-operations.md | markdown | 1.7 KB |
| scripts/security-checklist.sh | script | 734 B |
SKILL.md
View on GitHub---
name: nodejs-express-server
description: >
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.
---
# Node.js Express Server
## Table of Contents
- [Overview](#overview)
- [When to Use](#when-to-use)
- [Quick Start](#quick-start)
- [Reference Guides](#reference-guides)
- [Best Practices](#best-practices)
## 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:
```javascript
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/` work:
| Guide | Contents |
| ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
| [Basic Express Setup](references/basic-express-setup.md) | Basic Express Setup |
| [Middleware Chain Implementation](references/middleware-chain-implementation.md) | Middleware Chain Implementation |
| [Database Integration (PostgreSQL with Sequelize)](references/database-integration-postgresql-with-sequelize.md) | Database Integration (PostgreSQL with Sequelize) |
| [Authentication with JWT](references/authentication-with-jwt.md) | Authentication with JWT |
| [RESTful Routes with CRUD Operations](references/restful-routes-with-crud-operations.md) | RESTful Routes with CRUD Operations |
| [Error Handling Middleware](references/error-handling-middleware.md) | Error Handling Middleware |
| [Environment Configuration](references/environment-configuration.md) | Environment 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
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |