/owl-pizza

A demo of Twilio Notify using Ionic

Primary LanguageJavaScriptMIT LicenseMIT

Owl Pizza

About

This is a project to show different functionality of Twilio Notify and Ionic 2. It consists of a Node.js server and an Ionic app.

Requirements

  • Node.js
  • A Twilio Account - Sign up here
  • Access to the Notify Developer Preview - Apply here
  • Ngrok for exposing your localhost to the public and Twilio
  • For the iOS Application you will need a Apple Developer Account and Xcode installed
  • For Android you will need a Google Developer Account and the Android Studio tools

General Setup

  1. Install the Ionic (v2 or higher) command-line tool
npm install ionic cordova phonegap -g
  1. Get the necessary push credentials for iOS and Android. Guide for iOS | Guide for Android

  2. Create a Twilio Notify Service

Server Setup

  1. Go into server/ and install the Node.js dependencies
cd server && npm install
  1. Copy the .env.example into .env
cp .env.example .env
  1. Configure .env with the necessary values for your account

  2. Start the server by running

node .
  1. Run in a separate window ngrok to expose the server to the public and note down the URL for later
ngrok http 3000

App Setup

  1. Navigate in a separate terminal window into the ionic/ directory and install the dependencies
cd ionic && npm install
ionic state restore
  1. Copy the config from the app
cp src/app/config.example.ts src/app/config.ts
  1. Configure the config.ts file by filling out the registrationServer and senderID values.

  2. Build the app for the different platfroms by running

ionic build
  1. To deploy to iOS or Android open the respective projects in the platform/ folders.

  2. For more Ionic commands check out the documentation for the Ionic CLI

Questions

If you have any questions, feel free to shoot me an email to dkundel@twilio.com

License

MIT

Collaborators

Dominik Kundel dominik.kundel@gmail.com