You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -93,7 +93,7 @@ public async Task<IActionResult> MyAction()
93
93
94
94
Of course, you also need to supply the Node.js code you want to invoke. Create a file called `addNumber.js` at the root of your ASP.NET Core application, and add the following code:
* Optional. If specified, configures how the `NodeServices` instances will work.
165
165
* Properties:
166
-
*`HostingModel` - an `NodeHostingModel` enum value. See: [hosting models](#HostingModels)
166
+
*`HostingModel` - an `NodeHostingModel` enum value. See: [hosting models](#hosting-models)
167
167
*`ProjectPath` - if specified, controls the working directory used when launching Node instances. This affects, for example, the location that `require` statements resolve relative paths against. If not specified, your application root directory is used.
168
168
*`WatchFileExtensions` - if specified, the launched Node instance will watch for changes to any files with these extensions, and auto-restarts when any are changed.
169
169
@@ -175,15 +175,15 @@ If no `options` is passed, the default `WatchFileExtensions` array includes `.js
175
175
176
176
**Signature:**
177
177
178
-
```
178
+
```csharp
179
179
CreateNodeServices(NodeServicesOptionsoptions)
180
180
```
181
181
182
182
Directly supplies an instance of `NodeServices` without using ASP.NET's DI system.
@@ -194,7 +194,7 @@ var nodeServices = Configuration.CreateNodeServices(new NodeServicesOptions {
194
194
*`options` - type: `NodeServicesOptions`.
195
195
* Configures the returned `NodeServices` instance.
196
196
* Properties:
197
-
*`HostingModel` - an `NodeHostingModel` enum value. See: [hosting models](#HostingModels)
197
+
*`HostingModel` - an `NodeHostingModel` enum value. See: [hosting models](#hosting-models)
198
198
*`ProjectPath` - if specified, controls the working directory used when launching Node instances. This affects, for example, the location that `require` statements resolve relative paths against. If not specified, your application root directory is used.
199
199
*`WatchFileExtensions` - if specified, the launched Node instance will watch for changes to any files with these extension, and auto-restarts when any are changed.
200
200
@@ -206,23 +206,23 @@ If you create a `NodeServices` instance this way, you can also dispose it (call
206
206
207
207
**Signature:**
208
208
209
-
```
209
+
```csharp
210
210
Invoke<T>(stringmoduleName, paramsobject[] args)
211
211
```
212
212
213
213
Asynchronously calls a JavaScript function and returns the result, or throws an exception if the result was an error.
214
214
215
215
**Example 1: Getting a JSON-serializable object from Node (the most common use case)**
0 commit comments