Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 663 Bytes

README.md

File metadata and controls

43 lines (31 loc) · 663 Bytes

Learn Node Like a Pirate Workshop!

Introduction

Follow the steps below:

  • Install package: npm i pirate-node
  • Consume the package as follows:
const pirate = require('pirate-node')

Then run the file! http://lmgtfy.com/?q=run+node+file

  • NOTE please keep hold of the userId that gets returned from the callback

Callback Cove

encryption

Data should be a utf8 string.

pirate.ahoy()
pirate.encrypt(data, 'key', (err, encrypted) => {
})

decryption

pirate.decrypt(data, 'key', (err, decrypted) => {

})

sendMessage

pirate.sendMessage(message, (err, response) => {
  // read response
})