Skip to content

Latest commit

 

History

History
43 lines (29 loc) · 1.39 KB

README.md

File metadata and controls

43 lines (29 loc) · 1.39 KB

Mailchain Workshop Starter Node

Welcome! This repository makes it easy to get your nodejs environment up and running for Mailchain workshops.

It includes:

  • an application initialized with NPM
  • a .gitignore template for node projects (source: Github gitignore templates)
  • configuration for .env (using dotenv) so you can add environment variables and secrets to your application.

Instructions

  1. Fork this repository, then clone it

  2. Install packages by running:

    npm install
  3. Copy .env.example to .env and update your SECRET_RECOVERY_PHRASE to your own Mailchain test and development account.

    If you have not created an account for test and dev, we recommend you append your regular Mailchain username with -test-dev, e.g. alice@mailchain >> alice-test-dev@mailchain.

  4. In the terminal, run the following to ensure the SDK is configured and working:

    npm test

    You should receive a message similar to:

    💌⛓ Tests complete! Mailchain appears to be working correctly

  5. You are now all setup to start working on your workshop module.

Sample code

In 'server.js' there is some sample code that you can use to test sending a Mailchain message using the SDK. Uncomment it or remove it if you do not need it.