pirate-node

node workshop

Usage no npm install needed!

<script type="module">
  import pirateNode from 'https://cdn.skypack.dev/pirate-node';
</script>

README

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
})