https://github.com/edixonalberto/api-email-sendgrid
Api to send email through of service the Sendgrid
https://github.com/edixonalberto/api-email-sendgrid
api node portfolio sendgrid typescript
Last synced: 3 months ago
JSON representation
Api to send email through of service the Sendgrid
- Host: GitHub
- URL: https://github.com/edixonalberto/api-email-sendgrid
- Owner: EdixonAlberto
- License: mit
- Created: 2020-04-15T21:01:43.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-22T15:09:21.000Z (over 3 years ago)
- Last Synced: 2025-01-17T03:46:07.357Z (over 1 year ago)
- Topics: api, node, portfolio, sendgrid, typescript
- Language: TypeScript
- Homepage:
- Size: 449 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Api Email Sendgrid
Api to send email through of service the Sendgrid

## Starter
Install all the dependencies.
```sh
yarn install
```
Create file `.env` with the keys they are in the template.
```sh
copy template.env .env
```
Add the environment variables.
- create a **SERVER_API_KEY** executing the command
```sh
yarn create-apikey
```
- create a **SENDGRID_API_KEY** logging into your
[sendgrid account](https://app.sendgrid.com/), which must have the following format:
`SG.aaaaaaaaaaaaaa.bbbbbbbbbbbbbbbbbbbbbbbb`
- create a **RECAPTCHA_API_KEY** using google service
[Recaptcha](https://developers.google.com/recaptcha/docs/v3).
Start api in mode development.
```sh
yarn dev
```
## Commands List
```sh
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
```
## Command to Deploy in Server
```sh
yarn build # build api
yarn start # run api builded
```
## Endpoints List
| 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 |
## Request Example
