-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
87 lines (75 loc) · 3.21 KB
/
index.html
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!DOCTYPE html>
<html>
<head>
<script src="//ajaxorg.github.io/ace-builds/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
<script src="https://unpkg.com/realm-web/dist/bundle.iife.js"></script>
<script src="modaldialog.js"></script>
<script src="bson.js"></script>
<script src="main.js"></script>
<script src="magic.js"></script>
<script src="reqres.js"></script>
<script src="driver.js"></script>
<script src="helpers.js"></script>
<script src="java.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<body onLoad="onLoad()">
<!-- Simulator -->
<div class="sim-container">
<!-- Menu Buttons -->
<div class="menu-container">
<a class="menu" target="_blank" href="examples/devday.html">Labs and Examples</a>
<a class="menu" href="docs/index.html">Documentation</a>
<a class="menu" onclick="document.getElementById('uploadCode').click()">Load</a>
<a class="menu" onclick="saveCode()">Save</a>
<a class="menu" onclick="_saveFileName=null;saveCode()">Save As</a>
<input style="display:none" onchange="loadLocalCode(this.files[0])" class="loadbutton" id="uploadCode" type="file" />
</div>
<div id="infobox" class="infobox"></div>
<div class="flex-container">
<!-- Code Editor -->
<div id="codediv" contenteditable class="code">
// get_XXXX or post_XXXX define Get and Post endpoints
function get_Hello(req, res) {
res.status(200);
res.send({ msg : "Hello " + req.query.get("name")
+ " try looking at the examples."})
}
</div>
<!-- New Editor -->
<div id="editor">
// get_XXXX or post_XXXX define Get and Post endpoints
function get_Hello(req, res) {
res.status(200);
res.send({ msg : "Hello " + req.query.get("name")
+ " try looking at the examples."})
}
</div>
<!-- Endpoint URL output -->
<div id="outputdiv" class="test">
<div>
<div class="label">Endpoint URL:</div>
<div class="url">
<div class="path staticpath" id="url"></div>
<div class="path" contenteditable id="endpoint" />Hello?name=Fellow+Developer
</div>
</div>
</div>
<!-- POST data output -->
<div class="label">POST Data:</div>
<div class="postdata" contenteditable id="postdata">
</div>
<div class="button-container">
<button class="button" onclick="callService('GET')" id="callServiceGET"> GET </button>
<button class="button" onclick="callService('POST')" id="callServicePOST"> POST </button>
<!-- loader commented out, we can add it in the future if that's needed -->
<!-- <div class="loader" id="loader"></div> -->
</div>
<!-- Response output -->
<div class="label">Response:</div>
<div id="response" class="response"> </div>
</div>
</div>
<div>
</body>
<html>