
XyPriss
A powerful Node.js web framework with built-in security, clustering, and performance optimizations
Overview
XyPriss is a powerful, TypeScript-first, open-source Node.js web framework that enhances your development experience with built-in security middleware, clustering, and performance optimizations. Whether you're building new applications or enhancing existing ones, XyPriss provides the tools you need for scalable, secure web development.
Key Features
Familiar API
Intuitive syntax for defining routes and middleware that feels natural to Node.js developers.
Built-in Security
Includes 12+ security middleware modules for common protections like CSRF, XSS, and rate limiting.
File Upload Support
Seamless integration with multer and other multipart form-data parsers.
Multi-Server Mode
Run multiple server instances with different configurations from a single setup.
Flexible Routing
Supports parameters, wildcards, and modular routers for organized code.
Performance
Advanced clustering, caching, and performance optimizations built-in.
Installation
Install XyPriss via npm or yarn:
npm install xypriss
# or
yarn add xypriss
For additional security features, install the security module:
npm install xypriss-security
Quick Start
🚀 Recommended: Use XyPriss CLI for Instant Setup
The fastest way to get started with XyPriss is using our CLI tool:
# Install the CLI globally
npm install -g xypriss-cli
# Create a new XyPriss project
xypcli init
# Follow the interactive prompts to configure your project
# Choose TypeScript/JavaScript
# Start development server
cd your-project-name
npm run dev
The CLI automatically generates:
- ✅ Pre-configured TypeScript/JavaScript setup
- ✅ Authentication system (optional)
- ✅ File upload support (optional)
- ✅ Multi-server configuration (optional)
- ✅ All dependencies installed
- ✅ Ready-to-run development server
Manual Setup
If you prefer manual setup, create a basic server with XyPriss:
import { createServer } from "xypriss";
const server = createServer({
server: { port: 3000 },
security: { enabled: true },
performance: { clustering: true },
});
server.get("/", (req, res) => {
res.json({ message: "Hello from XyPriss!", powered: "Nehonix" });
});
server.start(() => {
console.log(`Server running at http://localhost:${server.getPort()}`);
});
This sets up a server with security middleware and clustering enabled, listening on port 3000.
Works Great With Express
XyPriss is designed to complement the Node.js ecosystem, not replace it. You can:
- Use XyPriss standalone for new projects that need built-in security and clustering
- Enhance existing Express apps by integrating XyPriss security modules
- Run both frameworks side by side for different services
- Migrate gradually by moving specific routes or services to XyPriss
// Example: Using XyPriss security with Express
import express from "express";
import { XyPrissSecurity } from "xypriss-security";
const app = express();
// Add XyPriss security to your Express app
app.use(
XyPrissSecurity.middleware({
csrf: true,
xss: true,
rateLimit: { windowMs: 15 * 60 * 1000, max: 100 },
})
);
app.listen(3000);