This repository was archived by the owner on Jun 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +84
-9
lines changed Expand file tree Collapse file tree 7 files changed +84
-9
lines changed Original file line number Diff line number Diff line change
1
+ export TWILIO_ACCOUNT_SID = AC4ee8a4bf66c95837fc46316395718baa
2
+ export TWILIO_API_KEY = SKed26b2f58b7b62c4df51afe84cf4f2e3
3
+ export TWILIO_API_SECRET = 4aSAYLTwH56owOwCYWpnjK4zEEVFEKYQ
4
+ export TWILIO_IPM_SERVICE_SID = ISfe24d1ae731340d581045465b1a253bd
5
+ export TWILIO_AUTH_TOKEN = a9133ec06fdfb0ecf529b94cffd7772e
6
+ export DB_URL = jdbc:postgresql://localhost:5432/browser_calls
7
+ export DB_USERNAME = jose
8
+ export DB_PASSWORD =
9
+
10
+ export TWILIO_APPLICATION_SID = APXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
11
+ export TWILIO_PHONE_NUMBER = +17072053552
12
+
Original file line number Diff line number Diff line change
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
+
1
5
# Server Notifications with Servlets
2
6
3
7
[ ![ Build
@@ -10,7 +14,8 @@ Use Twilio to send SMS alerts so that you never miss a critical issue.
10
14
### Local Development
11
15
12
16
1 . First clone this repository and ` cd ` into it:
13
- ```
17
+
18
+ ``` bash
14
19
git clone git@github.com:TwilioDevEd/server-notifications-servlets.git
15
20
cd server-notifications-servlets
16
21
```
@@ -19,32 +24,32 @@ Use Twilio to send SMS alerts so that you never miss a critical issue.
19
24
20
25
You can find the AccountSID and the AuthToken at https://www.twilio.com/user/account/settings .
21
26
22
- ```
27
+ ``` bash
23
28
export TWILIO_ACCOUNT_SID=your account sid
24
29
export TWILIO_AUTH_TOKEN=your auth token
25
30
```
26
31
27
32
The Twilio Phone Number can be found at https://www.twilio.com/user/account/phone-numbers/incoming .
28
33
29
- ```
34
+ ``` bash
30
35
export TWILIO_PHONE_NUMBER=your Twilio phone number
31
36
```
32
37
33
38
3 . Make sure the tests succeed:
34
39
35
- ```
40
+ ``` bash
36
41
mvn compile test
37
42
```
38
43
39
- 4 . Run the application.
44
+ 4 . Run the application. The ` --debug ` flag is optional, it enables logging of requests,
45
+ responses and other application events.
40
46
41
- ```
42
- mvn compile && mvn jetty:run
47
+ ``` bash
48
+ mvn compile && mvn jetty:run --debug
43
49
```
44
50
45
51
5 . Check it out at [ http://localhost:8080 ] ( http://localhost:8080 )
46
52
47
- That's it!
48
53
49
54
## Meta
50
55
Original file line number Diff line number Diff line change 26
26
<dependency >
27
27
<groupId >com.twilio.sdk</groupId >
28
28
<artifactId >twilio</artifactId >
29
- <version >7.0.0-rc-29 </version >
29
+ <version >7.7.0 </version >
30
30
</dependency >
31
31
32
+ <!-- Logging -->
33
+ <dependency >
34
+ <groupId >ch.qos.logback</groupId >
35
+ <artifactId >logback-classic</artifactId >
36
+ <version >1.2.2</version >
37
+ </dependency >
38
+ <dependency >
39
+ <groupId >ch.qos.logback</groupId >
40
+ <artifactId >logback-core</artifactId >
41
+ <version >1.2.2</version >
42
+ </dependency >
43
+ <dependency >
44
+ <groupId >ch.qos.logback</groupId >
45
+ <artifactId >logback-access</artifactId >
46
+ <version >1.2.2</version >
47
+ </dependency >
48
+
49
+
32
50
<!-- Gson -->
33
51
<dependency >
34
52
<groupId >com.google.code.gson</groupId >
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" ?>
2
+ <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
3
+
4
+ <!-- =============================================================== -->
5
+ <!-- Configure the Logback Request Log -->
6
+ <!-- =============================================================== -->
7
+ <Configure id =" Server" class =" org.eclipse.jetty.server.Server" >
8
+ <Set name =" RequestLog" >
9
+ <New id =" RequestLog" class =" ch.qos.logback.access.jetty.RequestLogImpl" >
10
+ <Set name =" name" >logback-access</Set >
11
+ <Set name =" resource" >/logback-access.xml</Set >
12
+ <Call name =" start" />
13
+ </New >
14
+ </Set >
15
+ </Configure >
Original file line number Diff line number Diff line change
1
+ org.eclipse.jetty.util.log.class =org.eclipse.jetty.util.log.Slf4JLog
Original file line number Diff line number Diff line change
1
+ <configuration >
2
+ <appender name =" CONSOLE" class =" ch.qos.logback.core.ConsoleAppender" >
3
+ <encoder >
4
+ <pattern >%fullRequest%n%n%fullResponse</pattern >
5
+ </encoder >
6
+ </appender >
7
+ <appender-ref ref =" CONSOLE" />
8
+ </configuration >
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <!--
3
+ Example LOGBACK Configuration File
4
+ http://logback.qos.ch/manual/configuration.html
5
+ -->
6
+ <configuration scan =" true" scanPeriod =" 30 seconds" >
7
+ <appender name =" STDOUT" class =" ch.qos.logback.core.ConsoleAppender" >
8
+ <encoder >
9
+ <pattern >%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern >
10
+ </encoder >
11
+ </appender >
12
+
13
+ <root level =" debug" >
14
+ <appender-ref ref =" STDOUT" />
15
+ </root >
16
+ </configuration >
You can’t perform that action at this time.
0 commit comments