server-notifications-node
server-notifications-node copied to clipboard
server notifications demo app
Server notifications with Twilio, Node.js, and Express
Use Twilio to send SMS alerts so that you never miss a critical issue.
Local development
To run this project on your computer you will need to download and install either Node.js or io.js, both of which should also install npm.
You will also need to sign up for a Twilio account if you don't have one already.
-
First clone this repository and
cdinto it.git clone [email protected]:TwilioDevEd/server-notifications-node.git cd server-notifications-node -
Next, copy the sample configuration file
.env.exampleat the root of the project and update it with values from your Twilio account and local configuration. Save the file as.env. You'll need to setTWILIO_AUTH_TOKEN,TWILIO_ACCOUNT_SID, andTWILIO_NUMBER.For the
TWILIO_NUMBERvariable you'll need to provision a new number in the Manage Numbers page under your account. The phone number should be in E.164 formatcp .env.example .env -
Navigate to the project directory in your terminal and run:
npm installThis should install all of our project dependencies from npm into a local
node_modulesfolder. -
Make sure the tests succeed.
npm test -
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.Make sure you have customized the
config/administrators.jsonfile with your phone number and then open http://localhost:3000/error. You'll get a text message shortly informing you of an exception.npm install -g nodemon nodemon .
Meta
- No warranty expressed or implied. Software is as is. Diggity.
- MIT License
- Lovingly crafted by Twilio Developer Education.