Git Product home page Git Product logo

plivo_app_frontend's Introduction

Plivo Messaging App

This application usings Plivo's messaging APIs to send and receive text messages from a host web application.

Frontend

Technologies:

Built using create-react-app: https://www.npmjs.com/package/create-react-app

Backend

Technologies:

Note: Ruby version is 2.6.3 and Postgres version is 1.2.3

Other Technologies:

Setup Instructions

After cloning both the front and backend repos, please follow the steps listed below to get the application up and running:

  1. Create Plivo trial account at https://www.plivo.com/ and follow the instructions after clicking the Get Started button.
  • You will need to buy a phone, create an XML application (see step 5) and link it to the number, and then pre-register any numbers for which you wish to send text messages to
  1. From the terminal, navigate to the root directory of the backend repo and run the following command:
bundle install
  1. Create a .env file in the backend root directory and enter your Plivo variables, using the following format:
export PLIVO_AUTH_ID=
export PLIVO_AUTH_TOKEN=
export PLIVO_PHONE_NUMBER=
  1. In the terminal, type the following command (you will need to have ngrok installed - please run brew cask install ngrok to do so):
ngrok http 3001

This will create a tunnel to your local host on port 3001. Grab the URL from the terminal (sans http://) and paste the following before the last end of your config/environments/development.rb file:

config.hosts << "[NGROK URL]"
  1. Navigate to the Plivo dashboard and create a new XML application, linking it to your Plivo phone number. Within the application, paste the ngrok URL in the Message URL field, ensuring that POST is selected in the dropdown. The URL should look similar to this: http://c80bd249.ngrok.io/webhooks/plivo

  2. Create and migrate the database then start your server by running the following in the root folder of the app backend:

rails db:create
rails db:migrate
rails s -p 3001

The -p flag starts the server on port 3001

  1. Now navigate to the root folder of the frontend repo and run:
npm install
npm run start

plivo_app_frontend's People

Contributors

gwhitlock8 avatar

Watchers

 avatar  avatar

plivo_app_frontend's Issues

CORS policy issue

When attempting to make Plivo API call to retrieve all messages, I get the following response

image

I am using CORS anywhere as a proxy URL

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.