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.
-
Fork this repository, then clone it
-
Install packages by running:
npm install
-
Copy
.env.example
to.env
and update yourSECRET_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
. -
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
-
You are now all setup to start working on your workshop module.
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.