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: about 1 year 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 (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-06-26T18:39:01.000Z (almost 3 years ago)
- Last Synced: 2025-04-19T09:58:38.009Z (about 1 year ago)
- Topics: axios, express, javascript, nodejs, sms, twilio, twilio-api
- Language: JavaScript
- Homepage: https://post-my-message.vercel.app
- Size: 174 KB
- Stars: 24
- 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.
[](https://github.com/Pradumnasaraf/Post-My-Message/actions/workflows/prettier.yml) [](https://github.com/Pradumnasaraf/Post-My-Message/actions/workflows/publish-ghcr.yml) [](https://github.com/Pradumnasaraf/Post-My-Message/actions/workflows/linter.yml) [](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**
[](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 ⭐️