Skip to content
This repository has been archived by the owner on Nov 13, 2018. It is now read-only.

Commit

Permalink
Merged into SDK Starter
Browse files Browse the repository at this point in the history
  • Loading branch information
jefflinwood committed Jul 14, 2017
1 parent f844e58 commit 8d1c19d
Show file tree
Hide file tree
Showing 15 changed files with 2 additions and 416 deletions.
3 changes: 0 additions & 3 deletions .gitignore

This file was deleted.

7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

14 changes: 0 additions & 14 deletions Dockerfile

This file was deleted.

19 changes: 0 additions & 19 deletions LICENSE

This file was deleted.

2 changes: 0 additions & 2 deletions Procfile

This file was deleted.

57 changes: 2 additions & 55 deletions README.md
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,57 +1,4 @@
# Notifications Quickstart for Node.js
[![Build Status](https://travis-ci.org/TwilioDevEd/notifications-quickstart-node.svg?branch=master)](https://travis-ci.org/TwilioDevEd/notifications-quickstart-node)
# Notify Quickstart for Node

This application should give you a ready-made starting point for integrating notifications into your
own apps with Twilio Notifications.
This Quickstart application has been merged into the [SDK Starter for Node](https://github.com/TwilioDevEd/sdk-starter-node) application. Please check that GitHub repository for the latest sample code to get you up and running quickly!

# Configure Twilio account information
Before we begin, we need to collect the credentials we need to run the application.

Credential | Description
---------- | -----------
Twilio Account SID | Your main Twilio account identifier - [find it in the console](https://www.twilio.com/console).
Twilio Notification_Service SID | Use the create_service.js script to generate this. Just run 'node create_service.js' in your terminal, after you add the above configuration values to the `config.js` file.
Twilio Account Auth Token | Your Twilio authentication token - [find it in the console](https://www.twilio.com/console)

# Configure Notify push credentials
You will need to create a Notify Service through the [Twilio Console](https://www.twilio.com/console/notify/services), and add at least one credential on the [Mobile Push Credential screen](https://www.twilio.com/console/notify/credentials) (such as Apple Push Notification Service or Firebase Cloud Messaging for Android) to send notifications using Notify.

For help with setting up native mobile push credentials, please see the following guides:
[Set up push credentials for iOS push notifications](https://www.twilio.com/docs/api/chat/guides/push-notifications-ios)
[Set up push credentials for Android push notifications](https://www.twilio.com/docs/api/chat/guides/push-notifications-android)

# Setting up the Node.js Application

Edit the `config.js` file with the Twilio account information collected in the first step above, including your Twilio account SID, Notification Service SID, and Twilio auth token.

Next, we need to install our dependencies from npm:

```bash
npm install
```

Now we should be all set! Run the application using the `npm` command.

```bash
npm start
```

Your application should now be running at [http://localhost:3000](http://localhost:3000).

# Usage

When your app receives a 'registration' in the form of a POST request to the /register endpoint from a mobile client, it will create a binding. A binding is the address Twilio gives your app installation. It lets our service know where to send notifications.

To send a notification to the client run the notify script

```bash
node notify IDENTITY_HERE
```

The mobile client will receive a notification with the hardcoded 'Hello {IDENTITY}' message.

That's it! Check out our REST API [docs](http://www.local.twilio.com/docs/api/notifications/rest/overview) for more information on Twilio Notifications.

## License

MIT
5 changes: 0 additions & 5 deletions config.js

This file was deleted.

16 changes: 0 additions & 16 deletions create_service.js

This file was deleted.

6 changes: 0 additions & 6 deletions docker-compose.yml

This file was deleted.

140 changes: 0 additions & 140 deletions index.js

This file was deleted.

18 changes: 0 additions & 18 deletions notify.js

This file was deleted.

34 changes: 0 additions & 34 deletions package.json

This file was deleted.

34 changes: 0 additions & 34 deletions public/facebook_messenger.html

This file was deleted.

17 changes: 0 additions & 17 deletions public/node.svg

This file was deleted.

Loading

0 comments on commit 8d1c19d

Please sign in to comment.