Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit e656634

Browse files
committed
Update Readme.md to comply with standard
1 parent 8cbe948 commit e656634

File tree

2 files changed

+53
-45
lines changed

2 files changed

+53
-45
lines changed

README.md

Lines changed: 52 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<a href="https://www.twilio.com">
2+
<img src="https://static0.twilio.com/marketing/bundles/marketing/img/logos/wordmark-red.svg" alt="Twilio" width="250" />
3+
</a>
4+
15
# Server notifications with Twilio, Node.js, and Express
26

37
[![Build Status](https://travis-ci.org/TwilioDevEd/call-tracking-node.svg?branch=master)](https://travis-ci.org/TwilioDevEd/server-notifications-node)
@@ -6,66 +10,70 @@ Use Twilio to send SMS alerts so that you never miss a critical issue.
610

711
[Read the full tutorial here](https://www.twilio.com/docs/tutorials/walkthrough/server-notifications/node/express)!
812

9-
## Running the Project on Your Machine
13+
## Local development
1014

11-
To run this project on your computer, download or clone the source. You will
12-
also need to download and install either [Node.js](http://nodejs.org/)
13-
or [io.js](https://iojs.org/en/index.html), both of which should also install
14-
[npm](https://www.npmjs.com/).
15+
To run this project on your computer you will
16+
need to download and install either [Node.js](http://nodejs.org/)
17+
or [io.js](https://iojs.org/en/index.html), both of which should also install
18+
[npm](https://www.npmjs.com/).
1519

16-
You will also need to [sign up for a Twilio account](https://www.twilio.com/try-twilio)
20+
You will also need to [sign up for a Twilio account](https://www.twilio.com/try-twilio)
1721
if you don't have one already.
1822

19-
### Install Dependencies
23+
1. First clone this repository and `cd` into it.
2024

21-
Navigate to the project directory in your terminal and run:
25+
```bash
26+
$ git clone [email protected]:TwilioDevEd/server-notifications-node.git
27+
$ cd server-notifications-node
28+
```
2229

23-
```bash
24-
npm install
25-
```
30+
1. Next, open `.env.example` at the root of the project and update it with
31+
values from your
32+
[Twilio account](https://www.twilio.com/user/account/voice-messaging)
33+
and local configuration. Save the file as `.env`. You'll need to set
34+
`TWILIO_AUTH_TOKEN`, `TWILIO_ACCOUNT_SID`, and `TWILIO_NUMBER`.
2635

27-
This should install all of our project dependencies from npm into a local
28-
`node_modules` folder.
36+
For the `TWILIO_NUMBER` variable you'll need to provision a new number
37+
in the
38+
[Manage Numbers page](https://www.twilio.com/user/account/phone-numbers/incoming)
39+
under your account. The phone number should be in
40+
[E.164 format](https://www.twilio.com/help/faq/phone-numbers/how-do-i-format-phone-numbers-to-work-internationally)
2941

30-
### Configuration
42+
Run `source .env` to export the environment variables.
3143

32-
Next, open `.env.example` at the root of the project and update it with
33-
values from your
34-
[Twilio account](https://www.twilio.com/user/account/voice-messaging)
35-
and local configuration. Save the file as `.env`. You'll need to set
36-
`TWILIO_AUTH_TOKEN`, `TWILIO_ACCOUNT_SID`, and `TWILIO_NUMBER`.
44+
1. Navigate to the project directory in your terminal and run:
3745

38-
For the `TWILIO_NUMBER` variable you'll need to provision a new number
39-
in the
40-
[Manage Numbers page](https://www.twilio.com/user/account/phone-numbers/incoming)
41-
under your account. The phone number should be in
42-
[E.164 format](https://www.twilio.com/help/faq/phone-numbers/how-do-i-format-phone-numbers-to-work-internationally)
46+
```bash
47+
npm install
48+
```
4349

44-
### Running the Project
50+
This should install all of our project dependencies from npm into a local
51+
`node_modules` folder.
4552

46-
To launch the application, you can use `node .` in the project's root directory.
47-
You might also consider using [nodemon](https://github.com/remy/nodemon) for
48-
this. It works just like the node command, but automatically restarts your
49-
application when you change any source code files.
53+
1. Make sure the tests succeed.
5054

51-
Make sure you have customized the `config/administrators.json` file
52-
with your phone number and then open
53-
[http://localhost:3000/error](http://localhost:3000/error). You'll get a text message shortly
54-
informing you of an exception.
55+
```bash
56+
$ npm test
57+
```
5558

56-
```bash
57-
npm install -g nodemon
58-
nodemon .
59-
```
59+
1. To launch the application, you can use `node .` in the project's root directory.
60+
You might also consider using [nodemon](https://github.com/remy/nodemon) for
61+
this. It works just like the node command, but automatically restarts your
62+
application when you change any source code files.
6063
61-
### Running Tests
64+
Make sure you have customized the `config/administrators.json` file
65+
with your phone number and then open
66+
[http://localhost:3000/error](http://localhost:3000/error). You'll get a text message shortly
67+
informing you of an exception.
6268

63-
Basic functional tests can be run with:
69+
```bash
70+
npm install -g nodemon
71+
nodemon .
72+
```
6473

65-
```bash
66-
npm test
67-
```
6874

69-
## License
75+
## Meta
7076

71-
MIT
77+
* No warranty expressed or implied. Software is as is. Diggity.
78+
* [MIT License](http://www.opensource.org/licenses/mit-license.html)
79+
* Lovingly crafted by Twilio Developer Education.

twilioClient.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module.exports.sendSms = function(to, message) {
1111
.then(function(data) {
1212
console.log('Administrator notified');
1313
})
14-
.catch(function(err, data) {
14+
.catch(function(err) {
1515
console.error('Could not notify administrator');
1616
console.error(err);
1717
});

0 commit comments

Comments
 (0)