1.0.3 • Published 3 years ago

@cherrypiesdk/nextjs v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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