-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver.js
29 lines (25 loc) · 877 Bytes
/
server.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
const express = require('express');
const app = express();
const port = process.env.PORT || 3000
app.get('/.well-known/apple-app-site-association', (request, response) => {
response.set('Content-Type', 'application/json');
response.json({
"applinks": {
"details": [
{
"appID": "43253H4X22.com.braintreepayments.Demo",
"paths": ["*", "/", "/*", "/braintree-payments/*"]
}
]
}
})
})
app.get('/', function(req, res){
res.send('Simple site for testing the universal links in iOS. Open /.well-known/apple-app-site-association route');
})
app.get('/braintree-payments', function(req, res){
res.send('Braintree payments mock enpoint for testing Universal Links. Open /.well-known/apple-app-site-association route');
})
app.listen(port, function(){
console.log(`Server running on http://localhost:${port}/`);
})