Trouble Creating a Context/Tag/Layer for URL Service in Effect TypeScript

I appear to be having problems with making my first Context/Tag/Layer type ... thing.
I'm following https://www.typeonce.dev/course/effect-beginners-complete-getting-started/effect-services/define-services-with-context-tag

The finished github repo does not use this .of({}) construct. I am attempting to make a simple "build the URL" service, which uses the host for a remote REST API from an environment variable retrieved by Config.string().

I understand the providing of a Live implementation in place. I just seem to be having problems with the syntax.

The service should provide a single effect called buildURL, which should take a string as a parameter and return a string.

The git repo has their version of this using a Layer.effect(this, <static string>), which I'm trying to make into a function.
Was this page helpful?