All Projects → TwilioDevEd → marketing-notifications-node

TwilioDevEd / marketing-notifications-node

Licence: MIT license
Demo application showing how to implement SMS notifications (for a mobile marketing use case) in Node.js

Programming Languages

HTML
75241 projects
javascript
184084 projects - #8 most used programming language
Pug
443 projects

Projects that are alternatives of or similar to marketing-notifications-node

twilio flutter
A Flutter package for Twilio API.
Stars: ✭ 16 (+23.08%)
Mutual labels:  twilio-sms
appointment-reminders-csharp
Example App and Tutorial content for Appointment Reminders in C# | .NET
Stars: ✭ 16 (+23.08%)
Mutual labels:  twilio-sms
appointment-reminders-rails
A working Appointment Reminders sample built in Ruby on Rails
Stars: ✭ 36 (+176.92%)
Mutual labels:  twilio-sms
airtng-flask
AirTNG - Rental-by-owner properties fit for a Captain, implemented in Python with Flask
Stars: ✭ 16 (+23.08%)
Mutual labels:  twilio-sms
appointment-reminders-node
Node implementation of Appointment Reminders
Stars: ✭ 52 (+300%)
Mutual labels:  twilio-sms
survey-node
Automated surveys via text and voice in Node.js with Express and MongoDB
Stars: ✭ 37 (+184.62%)
Mutual labels:  twilio-sms
airtng-node
AirTNG - Rental-by-owner properties fit for a Captain, implemented with Node.js and Express
Stars: ✭ 43 (+230.77%)
Mutual labels:  twilio-sms
Twilio

SMS Notifications for Node.js and Express

Node.js CI

This example project demonstrates how to send SMS notifications (for a mobile marketing campaign) using Node.js and Express.

Read the full tutorial here!

Running the Project in production

1. Deploy your App

2. Configure your Twilio number

Go to your dashboard on Twilio. Click on Twilio Numbers and choose a number to setup.

On the phone number page, enter https://<appname.com>/message into the Messaging Request URL field.

Learn how to configure a Twilio phone number for Programmable SMS

3. Wrap Up!

Now your subscribers will be able to text your new Twilio number to 'Subscribe' to your Marketing Notifications line.

Congratulations!

Running the Project on Your Machine

To run this project on your computer, download or clone the source. You will also need to download and install:

Finally you will also need to sign up for a Twilio account if you don't have one already.

1. Install Dependencies

Navigate to the project directory in your terminal

npm install

This should install all of our project dependencies from npm into a local node_modules folder.

2. Copy the sample configuration file and edit it to match your configuration

cp .env.example .env

3. Configuration

Next, open config.js at the root of the project and update it with values from your environment and your Twilio account. You can either export these values as system environment variables (this is the default setup), or you can replace these values with hard-coded strings (be careful you don't commit them to git!).

This sample application stores data in a MongoDB database using Mongoose.

You can download and run MongoDB yourself

Our application will be looking for a fully qualified MongoDB connection string with a username and password embedded in it.

4. Running the Project

To launch the application, you can use node . in the project's root directory. You might also consider using nodemon for this. It works just like the node command, but automatically restarts your application when you change any source code files.

npm install -g nodemon \
nodemon .

5. Exposing Webhooks to Twilio

You will likely need to expose your local Node.js web application on the public Internet to work with Twilio. We recommend using ngrok to accomplish this. Use ngrok to expose a local port and get a publicly accessible URL you can use to accept incoming calls or texts to your Twilio numbers.

The following example would expose your local Node application running on port 3000 at http://chunky-danger-monkey.ngrok.com (reserved subdomains are a paid feature of ngrok):

ngrok -subdomain=chunky-danger-monkey 3000

License

MIT

Meta

  • No warranty expressed or implied. Software is as is. Diggity.
  • MIT License
  • Lovingly crafted by Twilio Developer Education.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].