Api to send email through of service the Sendgrid
MIT License
Api to send email through of service the Sendgrid
Install all the dependencies.
yarn install
Create file .env
with the keys they are in the template.
copy template.env .env
Add the environment variables.
yarn create-apikey
create a SENDGRID_API_KEY logging into your
sendgrid account, which must have the following format:
SG.aaaaaaaaaaaaaa.bbbbbbbbbbbbbbbbbbbbbbbb
create a RECAPTCHA_API_KEY using google service Recaptcha.
Start api in mode development.
yarn dev
yarn lint # linting to files .ts with Prettier
yarn create-apikey # create api key
yarn dev # run api in mode development
yarn prod # run api in mode production
yarn build # build api
yarn start # run api builded
Endpoint | HTTP | Description | Status |
---|---|---|---|
/api |
GET | Send a email from interface | IN PROGRESS |
/status |
GET | Check api status | OK |
/api/recaptcha_verify |
POST | Verify captcha of Google | OK |
/api/send_email |
POST | Send a email | OK |