kalyan-vurugonda / Post-My-Message

Send sms or a beautiful quote to your friend by a simple POST request.

Home Page:https://post-my-message.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Send sms or a beautiful quote to your friend by a simple POST request.

πŸ‘¨β€πŸ’» Tech stack

πŸ› οΈ 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/.

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.

{
    "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.

{
    "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

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

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

πŸ›‘οΈ License

This project is licensed under the MIT License - see the LICENSE file for details

🀝 Support

If you liked the project, please consider giving it a ⭐️

About

Send sms or a beautiful quote to your friend by a simple POST request.

https://post-my-message.vercel.app

License:GNU General Public License v3.0


Languages

Language:JavaScript 71.5%Language:HTML 15.3%Language:CSS 5.0%Language:Dockerfile 4.6%Language:Shell 3.7%