New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

expresspro

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expresspro

[![npm version](https://img.shields.io/npm/v/expresspro.svg)](https://www.npmjs.com/package/expresspro) [![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC) [![TypeScript](https://img.shields.io/badge/T

latest
Source
npmnpm
Version
2.0.0
Version published
Maintainers
1
Created
Source

ExpressPro

npm version License: ISC TypeScript

ExpressPro is an enhanced version of Express.js that provides additional utilities and middleware for building robust web applications. It extends Express with authentication, error handling, and response utilities out of the box.

Features

  • 🔐 JWT Authentication - Built-in JWT authentication system
  • 🛡️ Error Handling - Global error handler and custom error class
  • 🔄 Async Handler - Clean async/await error handling
  • 🔒 Password Hashing - Built-in bcrypt integration
  • 🌐 CORS Support - Easy CORS configuration
  • 📦 TypeScript Support - Full TypeScript support with type definitions

Installation

npm install expresspro
# or
yarn add expresspro
# or
pnpm add expresspro

Quick Start

import express from 'expresspro';

const app = express();

// Enable CORS
app.use(express.cors());

// Initialize JWT Authentication
const auth = new express.auth('your-secret-key', 'token');

// Protected route
app.get('/protected', auth.authMiddleware(), (req, res) => {
  res.json({ message: 'Protected route accessed' });
});

app.listen(3000, () => {
  console.log('Server running on port 3000');
});

Documentation

For detailed documentation, please visit our documentation directory:

Available Extensions

Authentication (express.auth)

const auth = new express.auth('secret', 'token');
app.get('/protected', auth.authMiddleware(), (req, res) => {
  res.json({ user: req.user });
});

Builtin JWT (express.jwt)

// Create token
const token=express.jwt.sign({id: 1, name: 'Suryansh'});
// Verify token
const decoded = express.jwt.verify(token, 'secret');

Error Handling (express.error)

app.use(express.error);
throw new express.AppError('Not found', 404);

Response Utilities (express.resp)

express.resp(res, 200, 'Success', { data });

Async Handler (express.asyncHandler)

app.get('/async', express.asyncHandler(async (req, res) => {
  const data = await someAsyncOperation();
  res.json({ data });
}));

TypeScript Support

ExpressPro is written in TypeScript and includes type definitions. The types are available in the @types directory.

import express from 'expresspro';
import { Request, Response } from 'express';

app.get('/users', express.asyncHandler(async (req: Request, res: Response) => {
  const users = await User.findAll();
  res.json({ users });
}));

Contributing

We welcome contributions! Please see our Contributing Guide for details.

Changelog

See our Changelog for a list of changes.

License

This project is licensed under the ISC License - see the LICENSE file for details.

Author

Suryansh Verma

Repository

GitHub Repository

Support

Security

If you discover any security-related issues, please email suryanshverma.dev.official@gmail.com instead of using the issue tracker.

Acknowledgments

  • Express.js team for the amazing framework
  • All contributors who have helped shape ExpressPro

Keywords

express-plus

FAQs

Package last updated on 18 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts