# NxResource Constructors

- Package: [CommunityToolkit.Aspire.Hosting.JavaScript.Extensions](/reference/api/csharp/communitytoolkit.aspire.hosting.javascript.extensions.md)
- Type: [NxResource](/reference/api/csharp/communitytoolkit.aspire.hosting.javascript.extensions/nxresource.md)
- Kind: `Constructors`
- Members: `1`

A resource that represents an Nx monorepo workspace.

## NxResource(string, string)

- Name: `Constructor(string, string)`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d9dc6fc02412d7398c5722840513d99965a6e98f/src/CommunityToolkit.Aspire.Hosting.JavaScript.Extensions/NxResource.cs#L10-L15)

A resource that represents an Nx monorepo workspace.

```csharp
public class NxResource
{
    public NxResource(
        string name,
        string workingDirectory)
    {
        // ...
    }
}
```

## Parameters

- `name` (`string`)
  The name of the resource.
- `workingDirectory` (`string`)
  The working directory of the Nx workspace.
