Registry / devops / rest-express

rest-express

JSON →
library1.2.0jsnpmunverified

A REST API framework built on top of Express, version 1.2.0. It provides a structured way to define routes with priorities and prefixes, and includes integrated support for response time tracking, logging (morgan), CORS, body parsing, gzip compression, HTTPS, and optional database connections (MSSQL, MySQL). The framework also includes a built-in Validator based on Joi. The project has not been updated in years and appears to be in maintenance mode. Compared to more active frameworks like Feathers or Sails, it is less feature-rich and poorly documented in English.

npm install rest-express
INSTALL
IMPORT
SIG · REST-EXPRESS
R
rest-express
devopsjavascriptv1.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
const restExpress = require('rest-express')
import restExpress from 'rest-express'
The package does not support ESM imports; only CommonJS is available.
MSSQL
const { MSSQL } = require('rest-express')
const MSSQL = require('rest-express').MSSQL
Both work but destructuring is preferred.
Validator
const { Validator } = require('rest-express')
const Validator = require('rest-express').Validator
Validator is exposed as a named export.

Shows how to start a rest-express server with common options like port, logging, CORS, gzip, and a routes directory.

const restExpress = require('rest-express'); const path = require('path'); const options = { port: 3000, enableResponseTime: true, enableLog: true, logFormat: 'combined', enableCors: true, enableGzip: true, routesPath: path.join(__dirname, 'routes'), apiPrefix: '/api' }; restExpress.startServer(options) .then((server) => { console.log('Server started on port', server.address().port); }) .catch((err) => { console.error('Server failed to start', err); });
Debug
Known issues
deprecatedPackage is unmaintained; no updates since 2018.
fix
Consider migrating to a more modern framework like Express itself or Feathers.
affects: >=1.0.0
gotchaPeer dependencies (mssql, mysql, multer) are not automatically installed; you must install them separately if needed.
fix
Run 'npm install mssql mysql multer' as needed.
affects: >=1.0.0
gotchaThe package uses CommonJS only; do not attempt to import it as an ES module.
fix
Use require instead of import.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'mssql'
Missing peer dependency mssql.
fix
Run 'npm install mssql'
Cannot find module 'rest-express'
Package not installed or import path wrong.
fix
Run 'npm install rest-express' and ensure using require.
Upgrade
Version history
1.2.0latest on npm
Audit
Dependencies
mssqloptionalpeer dependency for MSSQL database support
mysqloptionalpeer dependency for MySQL database support
multeroptionalpeer dependency for multipart form data handling
Agent activity
3 hits · last 30 days
node
2
Amazon
1
Resources
rest-express — npm install rest-express · libregistry