Uno.Wasm.Bootstrap/doc/features-node-js.md

25 строки
708 B
Markdown
Исходник Постоянная ссылка Обычный вид История

### Node.js support
The bootstrapper supports having a project loaded as part of a node application. To do so:
- Create a Wasm bootstrapper project, named `MyApp.Wasm`
- Create a Node.js TypeScript project in Visual Studio, named `MyApp.Runner`
- In boostrapper project, add the following :
```xml
<WasmShellDistPath>../MyApp.Runner/app</WasmShellDistPath>
<WasmShellMode>node</WasmShellMode>
```
- In the `app.ts`, add the following:
```js
require("./app/mono");
```
Run the application and the main method of the `MyApp.Wasm` will be executed.
The parameters of the node command line are provided to the app's main method when running the app as follows:
```
node app param1 param2
```