nodejs service BETTERPORTAL v11.0.3

service-betterportal-hello-view

betterportal/service-betterportal-hello-view

Hello view example service for BetterPortal v10

betterportal service example htmx

BetterPortal Hello View Example for Node.js

Reference business plugin for BetterPortal v10.

This package demonstrates:

  • a single canonical view endpoint
  • application/json and text/html negotiation
  • metadata representation
  • schema-first validation
  • support for the bootstrap1 and embedded themes

The API examples return domain data and stream items. They do not generate internal URL fields for the view. Renderers receive ViewRenderContext as their second argument and resolve navigation, actions and pagination locally with ctx.route(input?); see the hello showcase renderer for cursor-based fragment pagination. Select uiPath for page navigation, absoluteViewPath for HTML/HTMX requests and absoluteApiPath for JSON actions. Specify the action method; omit the target to resolve self. See the routing contract and paired API/view example.

For collections, return domain items, IDs and cursors from the API, then resolve links in the renderer. ctx.route() preserves repeated query values such as ?tag=a&tag=b; a scalar override replaces the complete key and null removes it. Embedded values such as /items?q=what?x&next=/a?b retain their complete content before encoding and overrides.

Select renderers with the explicit component or fragment option. Reserved _c/_f query keys in input paths or the current request are removed; only view destinations receive an explicit selector. Service base metadata preserves non-root prefixes and omits a root trailing slash.

The fatal prebuild check includes NodeNext .mts/.cts files and covers configured route/shell folders outside src plus source helpers under src/lib and src/dist, and follows statically traceable response helpers and object methods, aliases, array bindings/destructuring assignments with statically named computed keys, callbacks, promise constructors/combinators and string/collection transformations, including property descriptor factories/mutations and returned array mutations, reversible URI encoding, element selection, removed splice values and replacement values on dynamically initialized strings. Avoid returning internal destinations through these returned or yielded response paths. Public links, scalar counts/characters and domain-client results remain valid. Import BP handler factories from @betterportal/framework or the generated .bp-generated/route-runtime.js; unrelated provider helpers retain their own semantics.

sse: true requires a known registered GET subscriber feed or finite-stream endpoint on the current service. Unsupported ordinary routes, non-GET methods and dependency mounts with unknown streaming capability return null.

Dependency mounts require a resolved service path to identify an endpoint; missing service paths return null.

Selecting a domain field from a known object remains valid even when another field holds an internal destination. The authoring check follows the selected field through aliases.

BP ctx.response() bodies participate in the same checks as Response and JSON response helpers; public links and domain data remain valid.

The authoring gate follows explicitly rejected promise reasons into recovery callbacks and local response factories invoked through call, apply and bind. Recovery that returns domain data and factories that consume destinations without returning them remain valid. This source check covers recognized static patterns; it is not a proof of arbitrary JavaScript data flow.

Bound callback arguments precede caller-supplied promise/collection inputs during source checks. Explicit rejection reasons also follow local recovery parameters, preserving safe recovery without overlooking returned destinations.

Statically known spread arguments are expanded before call/apply/bind parameter mapping, including bound callbacks stored in known object fields.

Rejection provenance passes through then calls without rejection handlers and through finally, stopping when a rejection handler recovers.

Rest parameters retain the remaining argument array. Explicit rethrows and rejections retain their reason until recovery; native promise operations ignore extra callback arguments.

Installation

Use as a dependency (client reference)
bsb client install betterportal/service-betterportal-hello-view
Deploy as a service
bsb plugin install betterportal/service-betterportal-hello-view
Node.js (npm)
npm install @betterportal/hello-view

Configuration

Configuration options for this plugin:

No configuration required

Available Versions

v11.0.3 v11.0.2 v11.0.1 v11.0.0 v10.7.1 v10.7.0 v10.6.35 v10.6.34 v10.6.33 v10.6.32 v10.6.31 v10.6.30 v10.6.29 v10.6.28 v10.6.27 v10.6.26 v10.6.25 v10.6.24 v10.6.23 v10.6.22 v10.6.21 v10.6.20 v10.6.19 v10.6.18 v10.6.17 v10.6.16 v10.6.15 v10.6.14 v10.6.13 v10.6.12 v10.6.11 v10.6.10 v10.6.9 v10.6.7 v10.6.6 v10.6.3 v10.6.2 v10.6.1 v10.6.0 v10.5.0 v10.4.0 v10.3.0 v10.2.2 v10.2.1 v10.2.0 v10.1.70 v10.1.69 v10.1.68 v10.1.66 v10.1.64 v10.1.63 v10.1.62 v10.1.61 v10.1.60 v10.1.59 v10.1.58 v10.1.57 v10.1.56 v10.1.55 v10.1.54 v10.1.53 v10.1.52 v10.1.51 v10.1.50 v10.1.49 v10.1.48 v10.1.47 v10.1.46 v10.1.45 v10.1.44 v10.1.43 v10.1.42 v10.1.41 v10.1.40 v10.1.39 v10.1.38 v10.1.37 v10.1.32 v10.1.31 v10.1.30 v10.1.29 v10.1.28 v10.1.27 v10.1.26 v10.1.25 v10.1.24 v10.1.23 v10.1.22 v10.1.21 v10.1.20 v10.1.19 v10.1.18 v10.1.17 v10.1.16 v10.1.15 v10.1.11 v10.1.10 v10.1.9 v10.1.8 v10.1.7 v10.1.6 v10.1.5 v10.1.4 v10.1.3 v10.1.2 v10.1.1 v10.1.0 v10.0.31 v10.0.30 v10.0.29 v10.0.28 v10.0.27 v10.0.26 v10.0.25 v10.0.24 v10.0.23 v10.0.22 v10.0.21 v10.0.20 v10.0.19 v10.0.18 v10.0.17 v10.0.16 v10.0.15 v10.0.14 v10.0.13 v10.0.12 v10.0.10 v10.0.9 v10.0.8 v10.0.7 v10.0.6 v10.0.5 v10.0.4 v10.0.3

Dependencies

No dependencies

Metadata