Giter VIP home page Giter VIP logo

cli's Introduction

Messageraft

Messageraft

Status Version License GitHub Issues GitHub Pull Requests

Social

๐Ÿ’ก Notification Gateway for sending emails, sms, direct chat and more!

๐Ÿ“ Table of Contents

๐Ÿง About

Messageraft is a notification gateway where you have a single API to send multiple types of notification.

By configuring Messageraft with your 3rd party provider API keys you can use this service to send your message and Messageraft does the rest

Currently supported providers out of the box: Sendgrid, Twilio and Slack

You can also improve your email testing by using maildev in combination with the maildev provider we created for you!

๐Ÿ Getting Started

Step 1 - Install CLI

$ npm i -g @messageraft/cli

OR

$ yarn global add @messageraft/cli

Step 2 - Run init command

Main question the CLI will ask is to select the providers you want to install

$ messageraft init <directory-name>

Step 3 - Setup ENV variables

Last step before spinning up the server is to setup the environment variables. Check config/env/development.example.env on necessary details needed based on the providers you selected

IMPORTANT: Don't forget to rename development.example.env -> development.env

Step 4 - Start server and send request

The server was created using Nest JS but there is nothing you need to touch really.

# Start server locally

$ npm run start:dev
 
OR

$ yarn start:dev

NOTE: Ideally if you are going to deploy then you should first build the server before running, also creating a production.env file is required

Step 5 - Send a message

curl --request POST \
--header "Content-Type: application/json" \
--data '{
  "data": {
   "to": "[email protected]",
   "from": "[email protected]",
   "subject": "Testing",
   "html": "<p>Hello <strong>World</strong></p>"
  }
}' \
http://localhost:3000/message/send/sendgrid

โœ๏ธ API Documentation

Messageraft is using Swagger to host the documentation, simply navigate to

http://localhost:3000/api

to view the documentation

โœ๏ธ Authors

cli's People

Contributors

pitops avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

cli's Issues

Change the way you choose providers

Currently you choose by pressing <space> and then <enter>, I found this confusing. I would like to navigate through the list and just hit <enter>.

The CLI hangs when trying to init a project

It stays in Installing server forever.

โฏ messageraft init send-emails
โœ” Choose providers (Press <space> to select, press <enter> to confirm) ยท SENDGRID
โœ” Creating directory
โ ธ Installing server

MacBook Pro (13-inch, M1, 2020) | macOS 11.2.3

Error when installing provider

Do I need to run the SendGrid service first? The docs aren't clear imho.

messageraft init send-emails
โœ” Choose providers (Press <space> to select, press <enter> to confirm) ยท SENDGRID
โœ” Creating directory
โ ง Installing server
โœ” Installing server
โ  Installing providers    Error: Command failed with exit code 1: yarn add @messageraft/sendgrid@^0.0.x
    error An unexpected error occurred: "http://localhost:4873/@sendgrid%2fmail/-/mail-7.4.6.tgz: connect ECONNREFUSED 127.0.0.1:4873".
    yarn add v1.22.11
    [1/4] Resolving packages...
    [2/4] Fetching packages...
    info If you think this is a bug, please open a bug report with the information provided in "/Users/ivor/Developer/experiments/send-emails/yarn-error.log".
    info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.