Skip to main content

Examples

Each example is self-contained and demonstrates one specific feature. Click Open in StackBlitz to run it directly in your browser, or view the source on GitHub.

#ExampleFeatureConfig setting(s)Links
01Basic APIZero-config CRUD for any resource(none)Source · Open in StackBlitz
02ResourcesRestrict API to specific resource namesresourcesSource · Open in StackBlitz
03Data PersistencyPersist data to a JSON fileconnectionStringSource · Open in StackBlitz
04Schema ValidationValidate request bodies with JSON SchemaschemasSource · Open in StackBlitz
05FilteringFilter collections with query strings(built-in)Source · Open in StackBlitz
06Request InterceptorIntercept requests (e.g. token auth)requestInterceptorSource · Open in StackBlitz
07Response InterceptorTransform GET response bodiesresponseBodyInterceptorSource · Open in StackBlitz
08EtagsETag caching and optimistic concurrencyetagsSource · Open in StackBlitz
09WebSocketsReal-time event broadcastingwebSocketSource · Open in StackBlitz
10OpenAPICustom OpenAPI spec metadataopenapiSource · Open in StackBlitz
11API PrefixAdd a path prefix to all routesapiPrefixSource · Open in StackBlitz
12CORSCustom CORS configurationcorsSource · Open in StackBlitz

All examples use the latest published version of Temba from npm. To run one locally:

cd "examples/01 - Basic API"
npm install
npm start