1.0.3 • Published 3 years ago
@cherrypiesdk/nextjs v1.0.3
CherryPie for NextJs
Installation
yarn add @cherrypiesdk/nextjs
CherryPie SDK Snippet
// api/dummy.js
import { withCherryPie } from '@cherrypiesdk/nextjs'
...
const handler = (req, res) => {
res.json({"hello": "world"})
}
export default withCherryPie(handler, {
apiKey: '<TOKEN>',
identityFunction: (request) => {
return {
entityKey: '1',
name: 'Peter Zakin'
}
},
})
Publishing package
npm adduser
npm version patch
npm publish --access public