Install packages
yarn add firebase-admin jsonwebtoken ms nanoid
# or
#!/bin/bash | |
# (optional) You might need to set your PATH variable at the top here | |
# depending on how you run this script | |
# PATH=PATH | |
# Hosted Zone ID e.g. BJBK35SKMM9OE | |
ZONEID="ZONEID" | |
# The CNAME you want to update e.g. hello.example.com |
/** | |
* An [Observer] for [Event]s, simplifying the pattern of checking if the [Event]'s content has | |
* already been handled. | |
* | |
* [onEventUnhandledContent] is *only* called if the [Event]'s contents has not been handled. | |
*/ | |
class EventObserver<T>(private val onEventUnhandledContent: (T) -> Unit) : Observer<Event<T>> { | |
override fun onChanged(event: Event<T>?) { | |
event?.getContentIfNotHandled()?.let { value -> | |
onEventUnhandledContent(value) |
-- | |
-- Read only | |
-- | |
-- Create a group | |
CREATE ROLE postgres_ro_group; | |
-- Grant access to existing tables | |
GRANT USAGE ON SCHEMA public TO postgres_ro_group; | |
GRANT SELECT ON ALL TABLES IN SCHEMA public TO postgres_ro_group; |