Style Guide
Project organization
Keep server and connected listeners in separate files
Keep HTTP route with its corresponding HttpEffect
import { r } from '@marblejs/http';
import { getFooEffect } from './getFoo.effect';
const getFoo = r.pipe(
r.matchPath('/foo'),
r.matchType('GET'),
r.useEffect(getFooEffect));import { HttpEffect } from '@marblejs/http';
export const getFooEffect: HttpEffect = (req$, ctx) => req$.pipe(
...
);Use index files for combining related effects
Context
Token naming and creation
Eager vs Lazy binding
Injection
Messaging
Event encoding/decoding
Event matching and validation
Effect output
Error handling
Last updated