mirror of
https://github.com/binwiederhier/ntfy.git
synced 2024-12-22 16:31:33 +03:00
Todo, readme
This commit is contained in:
parent
1321bf19dc
commit
b72afb1695
@ -103,6 +103,8 @@ To build releases, I use [GoReleaser](https://goreleaser.com/). If you have that
|
||||
|
||||
## TODO
|
||||
- add HTTPS
|
||||
- make limits configurable
|
||||
- limit max number of subscriptions
|
||||
|
||||
## Contributing
|
||||
I welcome any and all contributions. Just create a PR or an issue.
|
||||
|
@ -12,9 +12,9 @@
|
||||
<meta name="HandheldFriendly" content="true">
|
||||
|
||||
<!-- Mobile browsers, background color -->
|
||||
<meta name="theme-color" content="#004c79">
|
||||
<meta name="msapplication-navbutton-color" content="#004c79">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="#004c79">
|
||||
<meta name="theme-color" content="#39005a">
|
||||
<meta name="msapplication-navbutton-color" content="#39005a">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="#39005a">
|
||||
|
||||
<!-- Favicon, see favicon.io -->
|
||||
<link rel="icon" type="image/png" href="static/img/favicon.png">
|
||||
@ -56,7 +56,7 @@
|
||||
<form id="subscribeForm">
|
||||
<p>
|
||||
<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" />
|
||||
</p>
|
||||
</form>
|
||||
@ -83,7 +83,7 @@
|
||||
notifications like this (see <a href="https://github.com/binwiederhier/ntfy/tree/main/examples">full example</a>):
|
||||
</p>
|
||||
<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/>
|
||||
// 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>):
|
||||
</p>
|
||||
<code>
|
||||
fetch(`https://ntfy.sh/mytopic`, {<br/>
|
||||
fetch('https://ntfy.sh/mytopic', {<br/>
|
||||
method: 'POST', // PUT works too<br/>
|
||||
body: `Hello from the other side.`<br/>
|
||||
body: 'Hello from the other side.'<br/>
|
||||
})
|
||||
</code>
|
||||
<p>
|
||||
|
Loading…
Reference in New Issue
Block a user