-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtutorial.html
More file actions
55 lines (47 loc) · 2 KB
/
tutorial.html
File metadata and controls
55 lines (47 loc) · 2 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>TUTORIAL APP - FamilySearch JavaScript SDK</title>
</head>
<body>
<!-- normally scripts would be added at the bottom of the page, but in order
to make the example source code easier to develop and view we have it at the top.
this allows us to have the javascript code next to the html code it interacts with. -->
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="//cdn.jsdelivr.net/familysearch-javascript-sdk/2.0.4/familysearch-javascript-sdk.min.js"></script>
<script>
// Setup the SDK client
var client = new FamilySearch({
// A client ID for sandbox is obtained by registering with the FamilySearch developer's website
client_id: 'a0T3000000BNAgBEAX',
// When using the JavaScript SDK, the redirect uri doesn't need to be a
// page that actually exists, it just needs to be a page on the same domain.
// Here we programmatically set the redirect uri to the base path of the
// current domain. That helps the sample app work wherever it runs so
// that we don't have to change this between development and production.
redirect_uri: document.location.origin + '/',
// Store the access token in a cookie so that the user doesn't have to
// login every time the page loads
save_access_token: true,
// Sandbox is the testing environment
environment: 'sandbox'
});
</script>
</div><!-- end main column -->
</div>
</div><!-- end main container -->
<% if(typeof exampleSource !== 'undefined'){ %>
<script>
<%- exampleSource %>
</script>
<% } %>
</body>
</html>
var server = app.listen(process.env.PORT || 8080, process.env.IP, function () {
var host = server.address().address;
var port = server.address().port;
console.log('listening at http://%s:%s', host, port);
});