Skip to content

Node.js

Use BuildTarget.node when the deployment environment is already Node-oriented or your platform expects a Node runtime.

Example config

dart
import 'package:spry/config.dart';

void main() {
  defineSpryConfig(
    host: '127.0.0.1',
    port: 4200,
    target: BuildTarget.node,
  );
}

Good fit

  • existing Node-based hosting
  • environments where Node is the standard runtime contract
  • teams that want Spry route code in Dart but production hosting in Node

Practical note

Keep your route tree in Dart. Only the emitted runtime target changes. That separation is the value of the Node target.

Released under the MIT License.