Skip to content

Commit

Permalink
Merge branch 'sample-apps-ngrok-update' into 'main'
Browse files Browse the repository at this point in the history
Update sample apps to point to QR code generator

See merge request evernym/verity/verity-sdk!72
  • Loading branch information
skhoroshavin committed Jan 20, 2022
2 parents 279df98 + e41527f commit 7d37aa9
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
3 changes: 1 addition & 2 deletions samples/sdk/dotnet-example-app/App.cs
Original file line number Diff line number Diff line change
Expand Up @@ -605,8 +605,7 @@ void relationshipHandler(RelationshipV1_0 handler)

if (!(Environment.GetEnvironmentVariable("HTTP_SERVER_URL") == null))
{
App.consoleOutput("Open the following URL in your browser and scan presented QR code");
App.coloredConsoleOutput(Environment.GetEnvironmentVariable("HTTP_SERVER_URL") + "/dotnet-example-app/qrcode.html");
App.consoleOutput("Please copy and paste the inviteURL into an external QR code generator (e.g. https://www.qr-code-generator.com/) and scan the QR code from there to establish a connection");
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,7 @@ else if("invitation".equals(msgName)){
}

if (!(System.getenv("HTTP_SERVER_URL") == null) ) {
println("Open the following URL in your browser and scan presented QR code");
println(ANSII_GREEN + System.getenv("HTTP_SERVER_URL") + "/java-example-app/qrcode.html" + ANSII_RESET);
println("Please copy and paste the inviteURL into an external QR code generator (e.g. https://www.qr-code-generator.com/) and scan the QR code from there to establish a connection");
}
else {
println("QR code generated at: qrcode.png");
Expand Down
5 changes: 3 additions & 2 deletions samples/sdk/nodejs-example-app/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,9 @@ async function createRelationship () {

console.log()
if (process.env.HTTP_SERVER_URL) {
console.log('Open the following URL in your browser and scan presented QR code')
console.log(`${ANSII_GREEN}${process.env.HTTP_SERVER_URL}/nodejs-example-app/qrcode.html${ANSII_RESET}`)
console.log(
'Please copy and paste the inviteURL into an external QR code generator (e.g. https://www.qr-code-generator.com/) and scan the QR code from there to establish a connection'
)
} else {
console.log('QR code generated at: qrcode.png')
console.log('Open this file and scan QR code to establish a connection')
Expand Down
3 changes: 1 addition & 2 deletions samples/sdk/python-example-app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,7 @@ async def invitation_handler(msg_name, message):
qr.png('qrcode.png')

if os.environ.get('HTTP_SERVER_URL'):
print('Open the following URL in your browser and scan presented QR code')
print(f'{ANSII_GREEN}{os.environ.get("HTTP_SERVER_URL")}/python-example-app/qrcode.html{ANSII_RESET}')
print('Please copy and paste the inviteURL into an external QR code generator (e.g. https://www.qr-code-generator.com/) and scan the QR code from there to establish a connection')
else:
print('QR code generated at: qrcode.png')
print('Open this file and scan QR code to establish a connection')
Expand Down
3 changes: 1 addition & 2 deletions sdk/dotnet-sdk/src/VeritySDK.Sample/App.cs
Original file line number Diff line number Diff line change
Expand Up @@ -588,8 +588,7 @@ void relationshipHandler(RelationshipV1_0 handler)

if (!(Environment.GetEnvironmentVariable("HTTP_SERVER_URL") == null))
{
App.consoleOutput("Open the following URL in your browser and scan presented QR code");
App.consoleOutput(Environment.GetEnvironmentVariable("HTTP_SERVER_URL") + "/dotnet-example-app/qrcode.html");
App.consoleOutput("Please copy and paste the inviteURL into an external QR code generator (e.g. https://www.qr-code-generator.com/) and scan the QR code from there to establish a connection");
}
else
{
Expand Down

0 comments on commit 7d37aa9

Please sign in to comment.