@@ -0,0 +1,22 @@
|
||||
## API Report File for "@backstage/plugin-nomad-backend"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
import { Config } from '@backstage/config';
|
||||
import express from 'express';
|
||||
import { Logger } from 'winston';
|
||||
|
||||
// @public (undocumented)
|
||||
export function createRouter(options: RouterOptions): Promise<express.Router>;
|
||||
|
||||
// @public (undocumented)
|
||||
export interface RouterOptions {
|
||||
// (undocumented)
|
||||
config: Config;
|
||||
// (undocumented)
|
||||
logger: Logger;
|
||||
}
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
```
|
||||
@@ -20,11 +20,13 @@ import express from 'express';
|
||||
import Router from 'express-promise-router';
|
||||
import { Logger } from 'winston';
|
||||
|
||||
/** @public */
|
||||
export interface RouterOptions {
|
||||
logger: Logger;
|
||||
config: Config;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
export async function createRouter(
|
||||
options: RouterOptions,
|
||||
): Promise<express.Router> {
|
||||
|
||||
@@ -41,7 +41,7 @@ Add configuration to your [`app-config.yaml`](https://github.com/backstage/backs
|
||||
```yaml
|
||||
nomad:
|
||||
addr: 'http://localhost:4646'
|
||||
token: '70d707b6-3d45-472e-8639-6b15770c19b8'
|
||||
token: '93e034ad-e504-42f9-129d-5d81be9f13d3'
|
||||
```
|
||||
|
||||
The `token` can be excluded if [ACLs are not enabled](https://developer.hashicorp.com/nomad/api-docs#authentication).
|
||||
|
||||
Reference in New Issue
Block a user