
Express Rest Api
- 836 installs
- 2 repo stars
- Updated January 7, 2026
- pluginagentmarketplace/custom-plugin-nodejs
express-rest-api is an agent skill that generates production-grade Express.js REST API skeletons with routing, middleware, validation, and error handling for developers who need scalable Node.js backend services quickly.
About
express-rest-api is a Node.js agent skill from pluginagentmarketplace that scaffolds production-ready RESTful APIs using Express.js. The skill follows a 5-step quick-start flow covering npm install, route definitions for GET POST PUT DELETE, JSON parsing and CORS middleware, security headers, and centralized error handling. It ships as sasmp_version 1.3.0 with a PRIMARY_BOND to the 01-nodejs-fundamentals bonded agent, so generated APIs align with established Node.js patterns. Developers reach for express-rest-api when bootstrapping a new backend service, microservice, or internal API and want routing, validation, and error middleware wired correctly from the first commit rather than assembling boilerplate manually.
- Generates complete Express.js application structure with JSON middleware, CORS, and security headers
- Creates RESTful route patterns for GET, POST, PUT, DELETE operations with parameterized IDs
- Includes centralized error handling and router modularization best practices
- 5-step quick start workflow from npm install to cloud deployment
- Bonded to 01-nodejs-fundamentals for consistent code style across projects
Express Rest Api by the numbers
- 836 all-time installs (skills.sh)
- +11 installs in the week ending Jul 28, 2026 (Skillselion tracking)
- Ranked #467 of 4,386 Backend & APIs skills by installs in the Skillselion catalog
- Security screen: MEDIUM risk (skills.sh audit)
- Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-nodejs --skill express-rest-apiAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 836 |
|---|---|
| repo stars | ★ 2 |
| Security audit | 3 / 3 scanners passed |
| Last updated | January 7, 2026 |
| Repository | pluginagentmarketplace/custom-plugin-nodejs ↗ |
How do you scaffold a production Express REST API?
Generate production-grade Express.js REST API skeletons with routing, middleware, validation, and error handling already wired up.
Who is it for?
Node.js developers starting a new REST API who want routing, middleware, validation, and error handling scaffolded in one pass.
Skip if: Teams already running NestJS, Fastify, or GraphQL backends who do not need Express-specific REST scaffolding.
When should I use this skill?
The user asks to create, scaffold, or bootstrap an Express.js REST API with routes and middleware.
What you get
An Express.js project with defined REST routes, middleware stack, input validation, and centralized error handler files.
- Express route files
- Middleware configuration
- Centralized error handler module
By the numbers
- 5-step quick-start from setup through test and deploy
- sasmp_version 1.3.0 with PRIMARY_BOND to 01-nodejs-fundamentals
Files
Express REST API Skill
Master building robust, scalable REST APIs with Express.js, the de-facto standard for Node.js web frameworks.
Quick Start
Build a basic Express API in 5 steps: 1. Setup Express - npm install express 2. Create Routes - Define GET, POST, PUT, DELETE endpoints 3. Add Middleware - JSON parsing, CORS, security headers 4. Handle Errors - Centralized error handling 5. Test & Deploy - Use Postman/Insomnia, deploy to cloud
Core Concepts
1. Express Application Structure
const express = require('express');
const app = express();
// Middleware
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
// Routes
app.use('/api/users', userRoutes);
app.use('/api/products', productRoutes);
// Error handling
app.use(errorHandler);
app.listen(3000, () => console.log('Server running'));2. RESTful Route Design
// GET /api/users - Get all users
// GET /api/users/:id - Get user by ID
// POST /api/users - Create user
// PUT /api/users/:id - Update user
// DELETE /api/users/:id - Delete user
const router = express.Router();
router.get('/', getAllUsers);
router.get('/:id', getUserById);
router.post('/', createUser);
router.put('/:id', updateUser);
router.delete('/:id', deleteUser);
module.exports = router;3. Middleware Patterns
// Authentication middleware
const authenticate = (req, res, next) => {
const token = req.headers.authorization;
if (!token) return res.status(401).json({ error: 'Unauthorized' });
// Verify token...
next();
};
// Validation middleware
const validate = (schema) => (req, res, next) => {
const { error } = schema.validate(req.body);
if (error) return res.status(400).json({ error: error.message });
next();
};
// Usage
router.post('/users', authenticate, validate(userSchema), createUser);4. Error Handling
// Custom error class
class APIError extends Error {
constructor(message, statusCode) {
super(message);
this.statusCode = statusCode;
}
}
// Global error handler
app.use((err, req, res, next) => {
const statusCode = err.statusCode || 500;
res.status(statusCode).json({
success: false,
error: err.message,
...(process.env.NODE_ENV === 'development' && { stack: err.stack })
});
});Learning Path
Beginner (2-3 weeks)
- ✅ Setup Express and create basic routes
- ✅ Understand middleware concept
- ✅ Implement CRUD operations
- ✅ Test with Postman
Intermediate (4-6 weeks)
- ✅ Implement authentication (JWT)
- ✅ Add input validation
- ✅ Organize code (MVC pattern)
- ✅ Connect to database
Advanced (8-10 weeks)
- ✅ API versioning (
/api/v1/,/api/v2/) - ✅ Rate limiting and security
- ✅ Pagination and filtering
- ✅ API documentation (Swagger)
- ✅ Performance optimization
Essential Packages
{
"dependencies": {
"express": "^4.18.0",
"helmet": "^7.0.0", // Security headers
"cors": "^2.8.5", // Cross-origin requests
"morgan": "^1.10.0", // HTTP logger
"express-validator": "^7.0.0", // Input validation
"express-rate-limit": "^6.0.0" // Rate limiting
}
}Common Patterns
Response Format
// Success
{ success: true, data: {...} }
// Error
{ success: false, error: "Message" }
// Pagination
{
success: true,
data: [...],
pagination: { page: 1, limit: 10, total: 100 }
}HTTP Status Codes
200 OK- Successful GET/PUT201 Created- Successful POST204 No Content- Successful DELETE400 Bad Request- Validation error401 Unauthorized- Auth required403 Forbidden- No permission404 Not Found- Resource not found500 Internal Error- Server error
Project Structure
src/
├── controllers/ # Route handlers
├── routes/ # Route definitions
├── middlewares/ # Custom middleware
├── models/ # Data models
├── services/ # Business logic
├── utils/ # Helpers
└── app.js # Express setupProduction Checklist
- ✅ Environment variables (.env)
- ✅ Security headers (Helmet)
- ✅ CORS configuration
- ✅ Rate limiting
- ✅ Input validation
- ✅ Error handling
- ✅ Logging (Morgan/Winston)
- ✅ Testing (Jest/Supertest)
- ✅ API documentation
Real-World Example
Complete user API:
const express = require('express');
const router = express.Router();
const { body } = require('express-validator');
// GET /api/users
router.get('/', async (req, res, next) => {
try {
const { page = 1, limit = 10 } = req.query;
const users = await User.find()
.limit(limit)
.skip((page - 1) * limit);
res.json({ success: true, data: users });
} catch (error) {
next(error);
}
});
// POST /api/users
router.post('/',
body('email').isEmail(),
body('password').isLength({ min: 8 }),
async (req, res, next) => {
try {
const user = await User.create(req.body);
res.status(201).json({ success: true, data: user });
} catch (error) {
next(error);
}
}
);
module.exports = router;When to Use
Use Express REST API when:
- Building backend for web/mobile apps
- Creating microservices
- Developing API-first applications
- Need flexible, lightweight framework
- Want large ecosystem and community
Related Skills
- Async Programming (handle async operations)
- Database Integration (connect to MongoDB/PostgreSQL)
- JWT Authentication (secure your APIs)
- Jest Testing (test your endpoints)
- Docker Deployment (containerize your API)
Resources
nodejs_skill: express-rest-api
express-rest-api Guide
#!/usr/bin/env python3
import json
print(json.dumps({"skill": "express-rest-api"}, indent=2))
Related skills
How it compares
Pick express-rest-api over generic backend skills when the stack is specifically Express.js and you need REST route and middleware boilerplate.
FAQ
What does express-rest-api generate?
express-rest-api generates production-grade Express.js REST API skeletons with routing for GET POST PUT DELETE, middleware for JSON parsing and CORS, security headers, validation hooks, and centralized error handling ready for scalable Node.js services.
What is the quick-start flow for express-rest-api?
express-rest-api follows 5 steps: install Express via npm, create REST routes, add JSON and CORS middleware, implement centralized error handling, then test and deploy the API skeleton.
Is Express Rest Api safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.