1.1.1 • Published 6 years ago
nocms-data-providers v1.1.1
NoCMS Data Providers
Pluggable handlers for common functionality in NoCMS publisher interface.
Installation
npm install nocms-data-providers
Usage
const config = require('nocms-config-client').get();
const { exportPages, getAllPages, pageHistory } = require('nocms-data-providers')({
pageService: config.pageService
});
// Set up route handlers
app.get('/api/nocms/export-pages', exportPages);
app.get('/api/nocms/get-all-pages', getAllPages);
app.get('/api/nocms/page-history', pageHistory);
That's it!