RestBundle is a JavaScript base class for creating reusable REST resource bundles that plug into Node.js Express applications. Version 1.1.0 is the current stable release, with a low release cadence. It provides a way to encapsulate related REST endpoints as a class with auto-generated handlers, and integrates with Vue.js 2 and Vuex for state management. Unlike plain Express routers, RestBundle offers a structured approach with resource methods and a state model, making it suitable for developers building modular API services. However, it has dependencies on Vue.js and Vuex, which may not be desirable for non-Vue projects.
npm install rest-bundleNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a simple REST bundle with GET and POST handlers and binds it to an Express app.
Ensure vue and vuex are installed as dependencies.
Update require path to use package name as base.
Manually register Vuex module using RestBundle.store. See migration guide.
Check calling code for order: (method, path, handler, contentType).
Run: npm install vue vuex
Ensure super() is called before any methods of the instance.