@cmsdriven/headless
v3.0.1
Published
npm package for cmsdriven content managment system build for any modern web app
Readme
Headless CMS
Create content in our platform and fetch it from our SDK
Visit the website: cmsdriven.io
Note: There is an online chat support ready to help you with any question
Install the dependancies
npm i @cmsdriven/headless --saveUse our SDK
// Import the cmsdriven sdk
const cmsdriven = require("@cmsdriven/headless");
// Create a client for your token
const client = cmsdriven.createClient({
accessToken: "YOUR_ACCESS_TOKEN_HERE"
});
// Ask for a specific page
this.pageComponents = await client.getPage('/test/page', 'http://dev.mydomain.com');
// Get all the pages by environment
this.pageComponents = await client.getAllPages('prod');
// Get all the pages by environment and specific tag
this.pageComponents = await client.getPagesByTag('MY_CUSTOM_TAG', 'staging');
