Skip to content

Commit 68e1f86

Browse files
author
Jerjou Cheng
committed
Fix up sendgrid README
1 parent 1056e98 commit 68e1f86

File tree

1 file changed

+23
-10
lines changed

1 file changed

+23
-10
lines changed

compute/sendgrid/README.md

+23-10
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ For more information about SendGrid, see their
1111

1212
[sample-docs]: https://cloud.google.com/compute/docs/tutorials/sending-mail/using-sendgrid
1313

14-
## Running on Compute Engine
14+
## Running on Compute Engine
1515

1616
To run the sample, you will need to do the following:
1717

@@ -20,17 +20,30 @@ To run the sample, you will need to do the following:
2020
1. Create a compute instance on the Google Cloud Platform Developer's Console
2121
1. SSH into the instance you created
2222
1. Update packages and install required packages
23-
sudo apt-get update && sudo apt-get install git-core openjdk-8-jdk maven
23+
24+
sudo apt-get update && sudo apt-get install git-core openjdk-8-jdk maven
25+
2426
1. Clone the repo
25-
git clone https://github.com/GoogleCloudPlatform/java-docs-samples.git
26-
1. Configure your SendGrid settings in the java class (SENDGRID_API_KEY, SENDGRID_SENDER, TO_EMAIL)
27-
java-docs-samples/compute/sendgrid/src/main/java/com/example/compute/sendgrid/SendEmailServlet.java
28-
1. Navigate back to ./sendgrid and use maven to package the class as a jar
29-
mvn clean package
27+
28+
git clone https://github.com/GoogleCloudPlatform/java-docs-samples.git
29+
30+
1. Configure your SendGrid settings in the java class (`SENDGRID_API_KEY`,
31+
`SENDGRID_SENDER`, `TO_EMAIL`)
32+
33+
java-docs-samples/compute/sendgrid/src/main/java/com/example/compute/sendgrid/SendEmailServlet.java
34+
35+
1. Navigate back to `./sendgrid` and use maven to package the class as a jar
36+
37+
mvn clean package
38+
3039
1. Switch to the target directory with the jar file and enable execution on that file
31-
chmod +x compute-sendgrid-1.0-SNAPSHOT-jar-with-dependencies.jar
40+
41+
chmod +x compute-sendgrid-1.0-SNAPSHOT-jar-with-dependencies.jar
42+
3243
1. Make sure that openjdk 8 is the selected java version
33-
sudo update-alternatives --config java
44+
45+
sudo update-alternatives --config java
46+
3447
1. Execute the jar file and send an email (make sure you are in the target folder)
35-
java -jar compute-sendgrid-1.0-SNAPSHOT-jar-with-dependencies.jar
3648

49+
java -jar compute-sendgrid-1.0-SNAPSHOT-jar-with-dependencies.jar

0 commit comments

Comments
 (0)