# PolyStreamer - multistreaming service built with Haxe!

**URL:** https://community.haxe.org/t/polystreamer-multistreaming-service-built-with-haxe/2804
**Category:** Showcase
**Created:** [December 14, 2020, 3:28pm UTC](https://community.haxe.org/t/polystreamer-multistreaming-service-built-with-haxe/2804 "2020-12-14T15:28:05Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![jcward](https://community.haxe.org/user_avatar/community.haxe.org/jcward/32/115_2.png) [@jcward](https://community.haxe.org/u/jcward)
#### Post date: [December 14, 2020, 3:28pm UTC](https://community.haxe.org/t/polystreamer-multistreaming-service-built-with-haxe/2804/1 "2020-12-14T15:28:06Z")

</div>

Hello Haxe friends,

[PolyStreamer.com](https://polystreamer.com) is live! And is currently free for testing and feedback. Dust off your OBS, give it a whirl, and let me know how it goes!

PolyStreamer is a super affordable and easy way to live stream to multiple platforms - like Facebook, YouTube, and Twitch - at the same time. The 3-min intro video on the homepage shows how it works.

For testing, set your stream’s Facebook privacy to “Only Me” and YouTube to “Unlisted”. (Twitch has no such option.)

:haxe: Haxe gives me shared code across the backend and frontend, and I’m playing with different ways to make my Rest APIs, remote procedure calls, and SQL queries type safe with Haxe magic. 👍

While you’re at it, I would greatly appreciate your follows / likes on my social profiles at [Twitter](https://twitter.com/PolyStreamer), [YouTube](https://www.youtube.com/channel/UCmudP8hiVnJpvIgxxdgb1Ww), and [Facebook](https://www.facebook.com/polystreamer).

---

<div class="post-metadata">

### Author: ![Confidant](https://community.haxe.org/user_avatar/community.haxe.org/confidant/32/63_2.png) [@Confidant](https://community.haxe.org/u/Confidant)
#### Post date: [December 14, 2020, 9:18pm UTC](https://community.haxe.org/t/polystreamer-multistreaming-service-built-with-haxe/2804/2 "2020-12-14T21:18:50Z")

</div>

Put the kettle on! 🙂 Looks good!

---

<div class="post-metadata">

### Author: ![fullofcaffeine](https://community.haxe.org/user_avatar/community.haxe.org/fullofcaffeine/32/28_2.png) [@fullofcaffeine](https://community.haxe.org/u/fullofcaffeine)
#### Post date: [December 15, 2020, 4:35pm UTC](https://community.haxe.org/t/polystreamer-multistreaming-service-built-with-haxe/2804/3 "2020-12-15T16:35:39Z")

</div>

Looks great! What runtime / stack, though? Could you elaborate a bit on that?

---

<div class="post-metadata">

### Author: ![jcward](https://community.haxe.org/user_avatar/community.haxe.org/jcward/32/115_2.png) [@jcward](https://community.haxe.org/u/jcward)
#### Post date: [December 16, 2020, 2:51am UTC](https://community.haxe.org/t/polystreamer-multistreaming-service-built-with-haxe/2804/4 "2020-12-16T02:51:21Z")

</div>

Thanks! Talk about the stack? But that’ll reveal all my unpopular opinions and questionable choices. 😆

It’s running on nodejs, behind nginx, serving http2. The CMS is custom made (also Haxe.)

The frontend Haxe is being compiled with modular-js into small, single-class AMD modules (I think HTTP2 makes this a reasonable strategy.) It’s vanillaJS and some Riot v2 (ages old, but I like it and have tooling around it.) I have no appetite for “modern js”.

On the backend, I’m quite enjoying the [jsasync macro](https://lib.haxe.org/p/jsasync) to take advantage of native async / await. Thanks @basro !

I started the project playing with lix… But I still prefer just [switching my haxe versions manually](https://community.haxe.org/t/quick-write-up-of-how-i-manage-haxe-versions-under-linux/1694) and storing 3rd party lib source directly into my repo.

My servers’ setups are all scripted, some services are dockerized. I have RTMP ingest servers in 6 countries with DNS-based location resolution:

![sm_servers.jpg](https://community.haxe.org/uploads/default/original/2X/b/b454c6da27e3b0fd10301db41c89ea2f8cd7d5a8.jpeg)

(I should look for a host in South America, not available from my current hosts. ☹ )

Run `ping live.polystreamer.com` to see where it resolves for you:

```haxe
>ping live.polystreamer.com
PING us-east.live.polystreamer.com ...

```

My legal docs are based on Automattic’s legalmattic repo - thanks for that. 😉 And the parrot icon truly [came before](https://twitter.com/PolyStreamer/status/1329985749710753793) all of the above - I thought @RobDangerous would appreciate that :parrot:

That’s about it - fun, fun! 😃

Best,  
-Jeff

---

<div class="post-metadata">

### Author: ![basro](https://community.haxe.org/user_avatar/community.haxe.org/basro/32/738_2.png) [@basro](https://community.haxe.org/u/basro)
#### Post date: [December 16, 2020, 4:35am UTC](https://community.haxe.org/t/polystreamer-multistreaming-service-built-with-haxe/2804/5 "2020-12-16T04:35:14Z")

</div>

I’m really happy that you found jsasync useful 😃

---

<div class="post-metadata">

### Author: ![RobDangerous](https://community.haxe.org/user_avatar/community.haxe.org/robdangerous/32/55_2.png) [@RobDangerous](https://community.haxe.org/u/RobDangerous)
#### Post date: [December 16, 2020, 8:30am UTC](https://community.haxe.org/t/polystreamer-multistreaming-service-built-with-haxe/2804/6 "2020-12-16T08:30:13Z")

</div>

Rob approves and appreciates that.

---

<div class="post-metadata">

### Author: ![cambiata](https://community.haxe.org/user_avatar/community.haxe.org/cambiata/32/61_2.png) [@cambiata](https://community.haxe.org/u/cambiata)
#### Post date: [December 23, 2020, 12:09pm UTC](https://community.haxe.org/t/polystreamer-multistreaming-service-built-with-haxe/2804/7 "2020-12-23T12:09:27Z")

</div>

Thanks for sharing, Jeff!  
Best luck with the project!

---

<div class="post-metadata">

### Author: ![jcward](https://community.haxe.org/user_avatar/community.haxe.org/jcward/32/115_2.png) [@jcward](https://community.haxe.org/u/jcward)
#### Post date: [January 2, 2021, 7:34pm UTC](https://community.haxe.org/t/polystreamer-multistreaming-service-built-with-haxe/2804/8 "2021-01-02T19:34:58Z")

</div>

Hello @cambiata, thanks very much! 🤞 😃

Hey, has anybody ever integrated Sripte payments before? Wow, when you’re doing subscriptions with metered usage, managing all that state is no simple task. 😆 Luckily they have a bunch of JSON objects in their [docs](https://stripe.com/docs/api/subscriptions/object), so the [json2typedef](https://community.haxe.org/t/great-tool-json2typedef/2824) tool really helped in creating typedefs. But you gotta admit, it’s pretty!

 ![stripe](https://community.haxe.org/uploads/default/original/2X/f/ff69652354131a1672eae19c7bce76bdc6e959cc.jpeg)
