Skip to content

Server Miscellaneous

Yichao Yu edited this page Jan 25, 2021 · 2 revisions

Email

Using nodemailer package. We use this to send confirmation and invitation emails. Could potentially also be used for custom notifications/alarms.

Config

Using config package with a YAML configure file for better readability. Also includes some setup for testing and initialization (creating directory) code.

URL utilities

E.g. to handle the URL correctly when/if we are behind a proxy in the real setup.

ZMQ utilities

For reading formatted binary data and to wrap ZMQ's API to allow multiple async caller to share the same socket to the same server.

DB utilities

Wrap around the DB interface to have a more convinient (dynamically scoped) transaction API. We use the cls-hooked package to support implicitly passing the transaction around. Compared to the original continuation-local-storage this works with the async API of the database.

Clone this wiki locally