{"id":47526,"library":"express-easy-rest","title":"express-easy-rest","description":"A lightweight, TypeScript-powered REST API framework built on Express, providing decorator-based controllers, model validation, and a clean separation of concerns. Currently at version 1.1.1, it requires Express >=4 and body-parser 1.x as peer dependencies. Designed for developers who want a structured, scalable API with minimal boilerplate, it leverages TypeScript decorators for defining routes and middleware. Alternative to other decorator-based frameworks like NestJS or ts.express, but with a simpler setup and less opinionated architecture. The package ships TypeScript type definitions. Release cadence appears low, with no recent updates since initial release.","status":"active","version":"1.1.1","language":"javascript","source_language":"en","source_url":"git://github.com/Odrin/express-easy-rest","tags":["javascript","node","express","rest","rest api","typescript"],"install":[{"cmd":"npm install express-easy-rest","lang":"bash","label":"npm"},{"cmd":"yarn add express-easy-rest","lang":"bash","label":"yarn"},{"cmd":"pnpm add express-easy-rest","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency: required as the core HTTP server framework","package":"express","optional":false},{"reason":"Peer dependency: needed for parsing request bodies","package":"body-parser","optional":false}],"imports":[{"note":"ESM default is available; CommonJS require may need .default or destructuring","wrong":"const ApplicationInstance = require('express-easy-rest').ApplicationInstance","symbol":"ApplicationInstance","correct":"import { ApplicationInstance } from 'express-easy-rest'"},{"note":"Both ESM and CJS work, but ensure TypeScript experimentalDecorators and emitDecoratorMetadata are enabled in tsconfig","wrong":"const { Controller } = require('express-easy-rest')","symbol":"Controller","correct":"import { Controller } from 'express-easy-rest'"},{"note":"ApiController is a named export from the main package; no subpath imports","wrong":"import { ApiController } from 'express-easy-rest/api-controller'","symbol":"ApiController","correct":"import { ApiController } from 'express-easy-rest'"},{"note":"Get is a named export, not a default export","wrong":"import Get from 'express-easy-rest'","symbol":"Get","correct":"import { Get } from 'express-easy-rest'"}],"quickstart":{"code":"// app.ts\nimport { ApplicationInstance, Controller, ApiController, Get } from 'express-easy-rest';\n\nclass App extends ApplicationInstance {}\n\nexport = new App();\n\n// book.controller.ts\n@Controller({ basePath: '/book' })\nexport class BookController extends ApiController {\n  private books: Array<{ id: number; title: string }> = [\n    { id: 1, title: 'Book 1' },\n    { id: 2, title: 'Book 2' }\n  ];\n\n  @Get('/list')\n  getBooks(): Promise<Array<{ id: number; title: string }>> {\n    return Promise.resolve(this.books);\n  }\n}\n\n// server.js (or compiled server.js)\nconst express = require('express');\nconst app = require('./app');\n\nconst server = express()\n  .use('/api', app.middleware())\n  .listen(3000, () => console.log('Server running on port 3000'));\n","lang":"typescript","description":"Creates a simple REST API with a BookController exposing a GET /api/book/list endpoint using decorators and an ApplicationInstance."},"warnings":[{"fix":"Consider using modern alternatives like NestJS or ts.express for active support.","message":"The library may not be actively maintained; check for breaking changes in Express 5.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Add \"experimentalDecorators\": true and \"emitDecoratorMetadata\": true to compilerOptions.","message":"TypeScript decorators require experimentalDecorators and emitDecoratorMetadata to be true in tsconfig.json.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use const app = require('./app').default; or set esModuleInterop: true in tsconfig.","message":"CommonJS require may not work directly if the package's module resolution is misconfigured; some users report needing to use .default.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1':41 '1.1.1':32 '4':36 'altern':67 'api':11,54,109 'appear':95 'architectur':86 'base':19,72 'bodi':39 'body-pars':38 'boilerpl':57 'built':13 'cadenc':94 'clean':25 'concern':28 'control':20 'current':29 'decor':18,61,71 'decorator-bas':17,70 'defin':63 'definit':92 'depend':45 'design':46 'develop':48 'easi':3 'express':2,15,35,106 'express-easy-rest':1 'framework':12,73 'initi':102 'javascript':104 'less':84 'leverag':59 'lightweight':6 'like':74 'low':96 'middlewar':66 'minim':56 'model':21 'nestj':75 'node':105 'opinion':85 'packag':88 'parser':40 'peer':44 'power':9 'provid':16 'recent':99 'releas':93,103 'requir':34 'rest':4,10,107,108 'rout':64 'scalabl':53 'separ':26 'setup':82 'ship':89 'simpler':81 'sinc':101 'structur':52 'ts.express':77 'type':91 'typescript':8,60,90,110 'typescript-pow':7 'updat':100 'valid':22 'version':31 'want':50 'x':42","created_at":"2026-06-07T16:51:58.136545+00:00","updated_at":"2026-06-07T16:51:58.136545+00:00","problems":[{"fix":"Run npm install express-easy-rest express body-parser.","cause":"Package not installed or peer dependencies missing.","error":"Cannot find module 'express-easy-rest'"},{"fix":"Add \"experimentalDecorators\": true and \"emitDecoratorMetadata\": true to tsconfig.json.","cause":"TypeScript decorators not enabled in tsconfig.json.","error":"Unexpected token @"},{"fix":"Ensure the App class extends ApplicationInstance and is exported as shown in the quickstart.","cause":"The app instance is not correctly exported or initialized.","error":"Property 'middleware' does not exist on type 'ApplicationInstance'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/Odrin/express-easy-rest#readme","github":"git://github.com/Odrin/express-easy-rest","docs":null,"changelog":null,"pypi":null,"npm":"express-easy-rest","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}