Todo, readme

This commit is contained in:
Philipp Heckel 2021-10-25 08:54:46 -04:00
parent 1321bf19dc
commit b72afb1695
2 changed files with 9 additions and 7 deletions

View File

@ -103,6 +103,8 @@ To build releases, I use [GoReleaser](https://goreleaser.com/). If you have that
## TODO ## TODO
- add HTTPS - add HTTPS
- make limits configurable
- limit max number of subscriptions
## Contributing ## Contributing
I welcome any and all contributions. Just create a PR or an issue. I welcome any and all contributions. Just create a PR or an issue.

View File

@ -12,9 +12,9 @@
<meta name="HandheldFriendly" content="true"> <meta name="HandheldFriendly" content="true">
<!-- Mobile browsers, background color --> <!-- Mobile browsers, background color -->
<meta name="theme-color" content="#004c79"> <meta name="theme-color" content="#39005a">
<meta name="msapplication-navbutton-color" content="#004c79"> <meta name="msapplication-navbutton-color" content="#39005a">
<meta name="apple-mobile-web-app-status-bar-style" content="#004c79"> <meta name="apple-mobile-web-app-status-bar-style" content="#39005a">
<!-- Favicon, see favicon.io --> <!-- Favicon, see favicon.io -->
<link rel="icon" type="image/png" href="static/img/favicon.png"> <link rel="icon" type="image/png" href="static/img/favicon.png">
@ -56,7 +56,7 @@
<form id="subscribeForm"> <form id="subscribeForm">
<p> <p>
<label for="topicField">Subscribe to topic:</label> <label for="topicField">Subscribe to topic:</label>
<input type="text" id="topicField" placeholder="Letters, numbers, _ and -" pattern="[-_A-Za-z]{1,64}" autofocus /> <input type="text" id="topicField" placeholder="Letters, numbers, _ and -" pattern="[-_A-Za-z]{1,64}" />
<input type="submit" id="subscribeButton" value="Subscribe" /> <input type="submit" id="subscribeButton" value="Subscribe" />
</p> </p>
</form> </form>
@ -83,7 +83,7 @@
notifications like this (see <a href="https://github.com/binwiederhier/ntfy/tree/main/examples">full example</a>): notifications like this (see <a href="https://github.com/binwiederhier/ntfy/tree/main/examples">full example</a>):
</p> </p>
<code> <code>
const eventSource = new EventSource(`https://ntfy.sh/mytopic/sse`);<br/> const eventSource = new EventSource('https://ntfy.sh/mytopic/sse');<br/>
eventSource.onmessage = (e) => {<br/> eventSource.onmessage = (e) => {<br/>
&nbsp;&nbsp;// Do something with e.data<br/> &nbsp;&nbsp;// Do something with e.data<br/>
}; };
@ -100,9 +100,9 @@
Here's an example in JS with <tt>fetch()</tt> (see <a href="https://github.com/binwiederhier/ntfy/tree/main/examples">full example</a>): Here's an example in JS with <tt>fetch()</tt> (see <a href="https://github.com/binwiederhier/ntfy/tree/main/examples">full example</a>):
</p> </p>
<code> <code>
fetch(`https://ntfy.sh/mytopic`, {<br/> fetch('https://ntfy.sh/mytopic', {<br/>
&nbsp;&nbsp;method: 'POST', // PUT works too<br/> &nbsp;&nbsp;method: 'POST', // PUT works too<br/>
&nbsp;&nbsp;body: `Hello from the other side.`<br/> &nbsp;&nbsp;body: 'Hello from the other side.'<br/>
}) })
</code> </code>
<p> <p>