Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Add a welcome page to the static resources #4289

Merged
merged 3 commits into from
Dec 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/merge_base_branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ else
fi

# Show what we are before
git show -s
git --no-pager show -s

# Set up username so it can do a merge
git config --global user.email bot@matrix.org
Expand All @@ -31,4 +31,4 @@ git fetch -u origin $GITBASE
git merge --no-edit origin/$GITBASE

# Show what we are after.
git show -s
git --no-pager show -s
1 change: 1 addition & 0 deletions changelog.d/4289.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add a welcome page for the client API port. Credit to @krombel!
1 change: 1 addition & 0 deletions changelog.d/4291.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Disable pager when running git-show in CI
3 changes: 3 additions & 0 deletions synapse/app/homeserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,11 @@ def _listener_http(self, config, listener_config):
handler = handler_cls(config, module_api)
resources[path] = AdditionalResource(self, handler.handle_request)

# try to find something useful to redirect '/' to
if WEB_CLIENT_PREFIX in resources:
root_resource = RootRedirect(WEB_CLIENT_PREFIX)
elif STATIC_PREFIX in resources:
root_resource = RootRedirect(STATIC_PREFIX)
else:
root_resource = NoResource()

Expand Down
26 changes: 26 additions & 0 deletions synapse/static/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<html>
<head>
<title>Synapse is running</title>
<style>
body {
width: 30em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
h1 {
text-align: center;
}
</style>
</head>
<body>
<h1>Synapse is running</h1>
<p>Congratulations!</p>
<p>Your Synapse server is listening on this port and is ready for messages.</p>
<p>To use this server you'll need a client - e.g. one of
<a href="https://matrix.org/docs/projects/try-matrix-now.html#clients">this list of Matrix clients</a>.</p>
<p>You can find (federated) rooms that might be of interest to you on
<a href="https://view.matrix.org/">view.matrix.org</a>.</p>
<p>Or you just start creating your own rooms with your friends.</p>
<p>Welcome to the Matrix universe :)</p>
</body>
</html>