Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pradumnasaraf/post-my-message
Send sms or a beautiful quote to your friend by a simple POST request.
https://github.com/pradumnasaraf/post-my-message
axios express javascript nodejs sms twilio twilio-api
Last synced: 6 days ago
JSON representation
Send sms or a beautiful quote to your friend by a simple POST request.
- Host: GitHub
- URL: https://github.com/pradumnasaraf/post-my-message
- Owner: Pradumnasaraf
- License: gpl-3.0
- Created: 2022-08-19T13:38:18.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-06-26T18:39:01.000Z (over 1 year ago)
- Last Synced: 2024-10-30T01:30:30.470Z (16 days ago)
- Topics: axios, express, javascript, nodejs, sms, twilio, twilio-api
- Language: JavaScript
- Homepage: https://post-my-message.vercel.app
- Size: 174 KB
- Stars: 23
- Watchers: 2
- Forks: 16
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
Send sms or a beautiful quote to your friend by a simple POST request.
[![Format](https://github.com/Pradumnasaraf/Post-My-Message/actions/workflows/prettier.yml/badge.svg)](https://github.com/Pradumnasaraf/Post-My-Message/actions/workflows/prettier.yml) [![Publish Image to GitHub Container Registry](https://github.com/Pradumnasaraf/Post-My-Message/actions/workflows/publish-ghcr.yml/badge.svg)](https://github.com/Pradumnasaraf/Post-My-Message/actions/workflows/publish-ghcr.yml) [![Linter](https://github.com/Pradumnasaraf/Post-My-Message/actions/workflows/linter.yml/badge.svg)](https://github.com/Pradumnasaraf/Post-My-Message/actions/workflows/linter.yml) [![Releases](https://github.com/Pradumnasaraf/Post-My-Message/actions/workflows/releases.yml/badge.svg)](https://github.com/Pradumnasaraf/Post-My-Message/actions/workflows/releases.yml)
## 👨💻 Tech stack
- [Node.js](https://nodejs.org/en/)
- [Express.js](https://expressjs.com/)
- [Twilio](https://www.twilio.com/)
- [Vercel](https://vercel.com/)## 🛠️ Using the Routes
After deploying the API the request will be on {API_BASE_URL}/{route}. This project is deployed with the base URL as [https://post-my-message.vercel.app](https://post-my-message.vercel.app).
**Send a custom message to a number - `/sendsms` POST method.**
It sends a custom message to the number provided. The request body should have a `"phone"` and `"message"`property that contains the receiver's number and a message. The POST body should be in JSON format.
```JSON
{
"message": "Hey, this message is from Twilio",
"phone": "+111111111111"
}
```**Send a random quote to a number - `/sendquote` POST method.**
It sends a random quote to the number provided. The request body should have a `"phone"` property that contains the receiver's number. The POST body should be in JSON format.
```JSON
{
"phone": "+111111111111"
}
```## 👨💻 Developing the API
This section includes how to test and develop API at your end. You can either run it in the cloud using **Gitpod** or run it inside a container using **docker** or choose to set up the complete environment locally.
**GitPod**
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/Pradumnasaraf/Post-My-Message)
**Docker Compose**
Prerequisites - Docker and Compose installed in your local system.
> NOTE: First add the the environment variables to the `.env.example` file.
You can run below command and you can access the API at `localhost:9001`
```bash
docker compose up
```**Local setup**
Prerequisites- Node.js installed and a Mongo server on your localhost.
> NOTE: First add the the environment variables to the `.env.example` file.
Step 1: Copy `.env.example` to `.env`.
```
npm run env
```Step 2: Run the app in development mode.
```
npm run dev
```You can access the API at localhost:9001
## 🛡️ License
This project is licensed under the GPL-3.0 license - see the [LICENSE](LICENSE) file for details
## 🤝 Support
If you liked the project, please consider giving it a ⭐️