A simple WebSocket chat server written in Haskell. Used in the JavaScript course from Devalot: https://code.devalot.com/training/webdev
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.html 519B

123456789101112131415161718192021222324
  1. <!DOCTYPE html>
  2. <title>WebSocket Chat Example</title>
  3. <h1>WebSocket Chat Example</h1>
  4. <template id="chat-template">
  5. <style>
  6. ul { list-style-type: none; }
  7. li { display: flex; }
  8. .sender { font-style: italic; padding-right: 1em; }
  9. </style>
  10. <form>
  11. <ul></ul>
  12. <input type="text" name="content">
  13. <input type="submit" value="Send">
  14. </form>
  15. </template>
  16. <chat-box data-host="example.com"
  17. data-code="abc123"
  18. data-user="Alice">
  19. </chat-box>
  20. <script src="example.js"></script>