SDK to integrate Phase in server-side applications running Node.js
npm i @phase.dev/phase-node
or yarn add @phase.dev/phase-node
const Phase = require("@phase.dev/phase-node");
Initialize the SDK with your APP_ID
and APP_SECRET
:
const phase = new Phase(APP_ID, APP_SECRET);
const ciphertext = await phase.encrypt("hello world");
const plaintext = await phase.decrypt(ciphertext);
npm install
npm run build
npm test