# DenoAppResource

- Module: [Aspire.Hosting.JavaScript](/reference/api/go/aspire.hosting.javascript.md)
- Version: `17.0.0`
- Kind: `handle`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)

A resource that represents a Deno application.

## Definition

```go
type DenoAppResource interface {
    IComputeResource
    IContainerFilesDestinationResource
    Resource
    ResourceWithArgs
    ResourceWithContainerFiles
    ResourceWithEndpoints
    ResourceWithEnvironment
    ResourceWithServiceDiscovery
    ResourceWithWaitSupport
}
```

## Embeds

- `IComputeResource`
- `IContainerFilesDestinationResource`
- `Resource`
- `ResourceWithArgs`
- `ResourceWithContainerFiles`
- `ResourceWithEndpoints`
- `ResourceWithEnvironment`
- [`ResourceWithServiceDiscovery`](/reference/api/go/aspire.hosting.javascript/resourcewithservicediscovery.md)
- `ResourceWithWaitSupport`

## Properties

- `ResourceTypeDisplayName`: `string` `get` -- Gets the ResourceTypeDisplayName property

## Methods

- [WithDenoAllow](/reference/api/go/aspire.hosting.javascript/denoappresource/withdenoallow.md) -- `method` -- Grants a Deno permission, optionally scoped to the supplied values.
  ```go
  WithDenoAllow(kind DenoPermissionKind, values []string) DenoAppResource
  ```
- [WithDenoAllowAll](/reference/api/go/aspire.hosting.javascript/denoappresource/withdenoallowall.md) -- `method` -- Controls the blanket `-A`/`--allow-all` grant.
  ```go
  WithDenoAllowAll(options ...*WithDenoAllowAllOptions) DenoAppResource
  ```
- [WithDenoConfig](/reference/api/go/aspire.hosting.javascript/denoappresource/withdenoconfig.md) -- `method` -- Sets `--config <file>` (path to a `deno.json`/`deno.jsonc`).
  ```go
  WithDenoConfig(configFile string) DenoAppResource
  ```
- [WithDenoDeny](/reference/api/go/aspire.hosting.javascript/denoappresource/withdenodeny.md) -- `method` -- Denies a Deno permission, optionally scoped to the supplied values.
  ```go
  WithDenoDeny(kind DenoPermissionKind, values []string) DenoAppResource
  ```
- [WithDenoImportMap](/reference/api/go/aspire.hosting.javascript/denoappresource/withdenoimportmap.md) -- `method` -- Sets `--import-map <file>`.
  ```go
  WithDenoImportMap(importMapFile string) DenoAppResource
  ```
- [WithDenoInspect](/reference/api/go/aspire.hosting.javascript/denoappresource/withdenoinspect.md) -- `method` -- Enables a Deno inspector mode, optionally at `hostPort` (for example `127.0.0.1:9229`).
  ```go
  WithDenoInspect(options ...*WithDenoInspectOptions) DenoAppResource
  ```
- [WithDenoLock](/reference/api/go/aspire.hosting.javascript/denoappresource/withdenolock.md) -- `method` -- Sets `--lock <file>`.
  ```go
  WithDenoLock(lockFile string) DenoAppResource
  ```
- [WithDenoNodeModulesDir](/reference/api/go/aspire.hosting.javascript/denoappresource/withdenonodemodulesdir.md) -- `method` -- Sets `--node-modules-dir`, optionally with a mode emitted as `--node-modules-dir=<mode>`.
  ```go
  WithDenoNodeModulesDir(options ...*WithDenoNodeModulesDirOptions) DenoAppResource
  ```
- [WithDenoNoLock](/reference/api/go/aspire.hosting.javascript/denoappresource/withdenonolock.md) -- `method` -- Sets `--no-lock`, disabling lockfile use.
  ```go
  WithDenoNoLock() DenoAppResource
  ```
- [WithDenoRun](/reference/api/go/aspire.hosting.javascript/denoappresource/withdenorun.md) -- `method` -- Selects the `deno run <entrypoint>` mode (the default).
  ```go
  WithDenoRun() DenoAppResource
  ```
- [WithDenoRuntimeArgs](/reference/api/go/aspire.hosting.javascript/denoappresource/withdenoruntimeargs.md) -- `method` -- Appends raw runtime arguments injected verbatim BEFORE the entrypoint. This is the escape hatch that gives full parity with `AddExecutable("name", "deno", workdir, args...)` for any flag not covered by a dedicated `WithDeno*` method.
  ```go
  WithDenoRuntimeArgs(args []string) DenoAppResource
  ```
- [WithDenoScriptArgs](/reference/api/go/aspire.hosting.javascript/denoappresource/withdenoscriptargs.md) -- `method` -- Appends arguments passed to the script AFTER the entrypoint. Deno forwards everything after the entrypoint to the running program.
  ```go
  WithDenoScriptArgs(args []string) DenoAppResource
  ```
- [WithDenoServe](/reference/api/go/aspire.hosting.javascript/denoappresource/withdenoserve.md) -- `method` -- Selects the `deno serve <entrypoint>` mode for serving an HTTP entrypoint.
  ```go
  WithDenoServe() DenoAppResource
  ```
- [WithDenoTask](/reference/api/go/aspire.hosting.javascript/denoappresource/withdenotask.md) -- `method` -- Selects the `deno task <taskName>` mode, running a task defined in `deno.json` instead of a script entrypoint. Permissions are defined by the task itself and are not emitted for this mode.
  ```go
  WithDenoTask(taskName string) DenoAppResource
  ```
- [WithDenoUnstable](/reference/api/go/aspire.hosting.javascript/denoappresource/withdenounstable.md) -- `method` -- Adds one or more `--unstable-*` flags. Each feature may be supplied bare (for example `"kv"`, `"worker-options"`, `"sloppy-imports"`) or fully qualified (`"--unstable-kv"`).
  ```go
  WithDenoUnstable(features []string) DenoAppResource
  ```
- [WithDenoWatch](/reference/api/go/aspire.hosting.javascript/denoappresource/withdenowatch.md) -- `method` -- Enables `--watch` (or `--watch-hmr` when `hmr` is `true`).
  ```go
  WithDenoWatch(options ...*WithDenoWatchOptions) DenoAppResource
  ```
