Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
1db51eb7
Commit
1db51eb7
authored
May 13, 2014
by
Daniel O'Connell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved sse.html to proxy_web_root/index.html
parent
0e640ae8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
21 deletions
+38
-21
index.html
examples/proxy_web_root/app1/index.html
+9
-0
index.html
examples/proxy_web_root/index.html
+29
-0
sse.html
examples/sse.html
+0
-21
No files found.
examples/proxy_web_root/app1/index.html
0 → 100644
View file @
1db51eb7
<html>
<head>
<title>
App1 Index
</title>
</head>
<body>
<h1>
This is App1 index page
</h1>
<p>
Image below is
</p>
</body>
</html>
examples/proxy_web_root/index.html
0 → 100644
View file @
1db51eb7
<html>
<head>
<title>
example.com index
</title>
<script
type=
"text/javascript"
>
window
.
onload
=
function
()
{
var
es
=
new
EventSource
(
"/api/sse"
);
var
div
=
document
.
getElementById
(
'events'
);
es
.
onmessage
=
function
(
ev
)
{
var
el
=
document
.
createElement
(
'div'
);
el
.
innerHTML
=
'sse message: '
+
ev
.
data
;
div
.
appendChild
(
el
);
// Keep only last 5 messages in the list
while
(
div
.
childNodes
.
length
>
5
)
div
.
removeChild
(
div
.
firstChild
);
};
};
</script>
</head>
<body>
<h1>
This is an example.com index page.
</h1>
<ul>
<li><a
href=
"app1"
>
App1
</a>
- App1 root
</li>
<li><a
href=
"app2"
>
App2
</a>
- App2 root
</li>
</ul>
<h2>
SSE pushes, done by separate threads at random times:
</h2>
<div
id=
"events"
></div>
</body>
</html>
examples/sse.html
deleted
100644 → 0
View file @
0e640ae8
<html>
<head>
<script
type=
"text/javascript"
>
window
.
onload
=
function
()
{
var
es
=
new
EventSource
(
"/api/sse"
);
var
div
=
document
.
getElementById
(
'events'
);
es
.
onmessage
=
function
(
ev
)
{
var
el
=
document
.
createElement
(
'div'
);
el
.
innerHTML
=
'sse message: '
+
ev
.
data
;
div
.
appendChild
(
el
);
// Keep only last 5 messages in the list
while
(
div
.
childNodes
.
length
>
5
)
div
.
removeChild
(
div
.
firstChild
);
};
};
</script>
</head>
<body>
<h1>
SSE pushes, done by separate threads at random times:
</h1>
<div
id=
"events"
></div>
</body>
</html>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment