Skip to content
This repository has been archived by the owner on Jun 20, 2022. It is now read-only.

Commit

Permalink
fix: readme indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
juliangoacher committed Mar 6, 2020
1 parent 2488f1c commit 36d4f97
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 75 deletions.
18 changes: 9 additions & 9 deletions packages/trail-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ main().catch(console.error)

The following configuration options can be passed to the `TrailsManager` constructor:

* `logger`: A logger (e.g. pino instance).
* `db`: Database pool configuration settings. Can include any of the following:
* `host`: The database host; defaults to `localhost`.
* `port`: The database port; defaults to `5432`.
* `database`: The database name; defaults to `trails`.
* `user`: The database username; defaults to `postgres`.
* `password`: The database password; defaults to `postgres`.
* `max`: The maximum pool size; defaults to `10`.
* `idleTimeoutMillis`: The timeout period; defaults to `30000`.
* `logger`: A logger (e.g. pino instance).
* `db`: Database pool configuration settings. Can include any of the following:
* `host`: The database host; defaults to `localhost`.
* `port`: The database port; defaults to `5432`.
* `database`: The database name; defaults to `trails`.
* `user`: The database username; defaults to `postgres`.
* `password`: The database password; defaults to `postgres`.
* `max`: The maximum pool size; defaults to `10`.
* `idleTimeoutMillis`: The timeout period; defaults to `30000`.

## The trail object

Expand Down
24 changes: 12 additions & 12 deletions packages/trail-fastify-graphql-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,37 +34,37 @@ Graphql queries can then be submitted to the `/graphql` path as either GET or PO

The plugin takes the following configuration options:

* `logger`: A logger to be passed to the trails manager.
* `db`: Database settings for the trails manager.
* `pool`: A pre-configured database pool to be used by the trails manager; used in preference to any specified database settings.
* `trailsManager`: A pre-configured trails manager instance; used in preference to any of the previous settings.
* `logger`: A logger to be passed to the trails manager.
* `db`: Database settings for the trails manager.
* `pool`: A pre-configured database pool to be used by the trails manager; used in preference to any specified database settings.
* `trailsManager`: A pre-configured trails manager instance; used in preference to any of the previous settings.

## Graphql schema

### Queries

The schema provides the following queries:

* `trail(id: Int!)`: Fetch a trail record by ID.
* `trails(from: Date!, to: Date!, ...)`: Search for trail records within a specified date range, and optionally filter by additional values.
* `enumerateTrails(from: Date!, to: Date!, type: TrailType!, ...)`: Return an enumeration of trails of the specified type, within the specified date range.
* `trail(id: Int!)`: Fetch a trail record by ID.
* `trails(from: Date!, to: Date!, ...)`: Search for trail records within a specified date range, and optionally filter by additional values.
* `enumerateTrails(from: Date!, to: Date!, type: TrailType!, ...)`: Return an enumeration of trails of the specified type, within the specified date range.

### Mutations

The schema provides the following mutations:

* `insertTrail(when: Date!, who: StringWithAttrs!, what: StringWithAttrs!, subject: StringWithAttrs!, where: JSON, why: JSON, meta: JSON)`: Insert a new trail record.
* `updateTrail(id: Int!, when: Date!, who: StringWithAttrs!, what: StringWithAttrs!, subject: StringWithAttrs!, where: JSON, why: JSON, meta: JSON)`: Update a trail record.
* `deleteTrail(id: Int!)`: Delete a trail record.
* `insertTrail(when: Date!, who: StringWithAttrs!, what: StringWithAttrs!, subject: StringWithAttrs!, where: JSON, why: JSON, meta: JSON)`: Insert a new trail record.
* `updateTrail(id: Int!, when: Date!, who: StringWithAttrs!, what: StringWithAttrs!, subject: StringWithAttrs!, where: JSON, why: JSON, meta: JSON)`: Update a trail record.
* `deleteTrail(id: Int!)`: Delete a trail record.

### String values

Some trail record fields support attributed string values (indicated by the `StringWithAttrs` type) when inserting or updating. When writing fields of this type, the value can be specified either as an object with an `id` property (specifying the string value) and additional properties which specify the string's attributes; or as a simple string value when no additional attributes are needed.

For example:

* String with attributes: `{ id: "the string", attr0: "this", attr1: 1 }`
* String with no attributes: `"the string"` - equivalent to `{ id: "the string" }`
* String with attributes: `{ id: "the string", attr0: "this", attr1: 1 }`
* String with no attributes: `"the string"` - equivalent to `{ id: "the string" }`

## Sample queries

Expand Down
8 changes: 4 additions & 4 deletions packages/trail-fastify-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ For more information on the REST API, you can check the generated OpenAPI / Swag

The plugin takes the following configuration options:

* `logger`: A logger to be passed to the trails manager.
* `db`: Database settings for the trails manager.
* `pool`: A pre-configured database pool to be used by the trails manager; used in preference to any specified database settings.
* `trailsManager`: A pre-configured trails manager instance; used in preference to any of the previous settings.
* `logger`: A logger to be passed to the trails manager.
* `db`: Database settings for the trails manager.
* `pool`: A pre-configured database pool to be used by the trails manager; used in preference to any specified database settings.
* `trailsManager`: A pre-configured trails manager instance; used in preference to any of the previous settings.

## License

Expand Down
44 changes: 22 additions & 22 deletions packages/trail-fastify-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,33 +26,33 @@ This will start a server on `localhost:8080`. Swagger UI documentation is access

The server looks for the following environment variables:

* `TRAIL_DB_HOST`: The hostname for the trail database.
* `TRAIL_DB_PORT`: The port number for the trail database.
* `TRAIL_DB_NAME`: The name of the trail database.
* `TRAIL_DB_USERNAME`: The username for the trail database.
* `TRAIL_DB_PASSWORD`: The password for the trail database.
* `TRAIL_DB_POOL_SIZE`: The size of the trail DB pool.
* `TRAIL_DB_TIMEOUT`: The trail database idle timeout, in milliseconds.
* `TRAIL_HTTP_HOST`: The hostname the HTTP server is bound to.
* `TRAIL_HTTP_PORT`: The port the HTTP server is bound to.
* `TRAIL_DISABLE_REST_API`: Switch indicating whether to disable the REST API.
* `TRAIL_DISABLE_GRAPHQL`: Switch indicating whether to disable the graphql endpoint.
* `TRAIL_DB_HOST`: The hostname for the trail database.
* `TRAIL_DB_PORT`: The port number for the trail database.
* `TRAIL_DB_NAME`: The name of the trail database.
* `TRAIL_DB_USERNAME`: The username for the trail database.
* `TRAIL_DB_PASSWORD`: The password for the trail database.
* `TRAIL_DB_POOL_SIZE`: The size of the trail DB pool.
* `TRAIL_DB_TIMEOUT`: The trail database idle timeout, in milliseconds.
* `TRAIL_HTTP_HOST`: The hostname the HTTP server is bound to.
* `TRAIL_HTTP_PORT`: The port the HTTP server is bound to.
* `TRAIL_DISABLE_REST_API`: Switch indicating whether to disable the REST API.
* `TRAIL_DISABLE_GRAPHQL`: Switch indicating whether to disable the graphql endpoint.

These can also be defined using a `.env` file.

The server also takes the following command line options:

* `--dbHost <host>`: The hostname for the trail database. Defaults to `localhost`.
* `--dbPort <port>`: The port number for the trail database. Defaults to `5432`.
* `--dbName <name>`: The name of the trail database. Defaults to `trails`.
* `--dbUsername <user>`: The username for the trail database. Defaults to `postgres`.
* `--dbPassword <password>`: The password for the trail database. Defaults to `postgres`.
* `--dbPoolsize <size>`: The size of the trail DB pool. Defaults to `10`.
* `--dbTimeout <ms>`: The trail database idle timeout, in milliseconds. Defaults to `30000`.
* `--httpHost <host>`: The hostname the HTTP server is bound to. Defaults to `localhost`.
* `--httpPort <port>`: The port the HTTP server is bound to. Defaults to `8080`.
* `--noRESTAPI`: Switch indicating whether to disable the Trail's REST API. Defaults to `false`.
* `--noGraphql`: Switch indicating whether to disable the graphql query endpoint. Defaults to `false`.
* `--dbHost <host>`: The hostname for the trail database. Defaults to `localhost`.
* `--dbPort <port>`: The port number for the trail database. Defaults to `5432`.
* `--dbName <name>`: The name of the trail database. Defaults to `trails`.
* `--dbUsername <user>`: The username for the trail database. Defaults to `postgres`.
* `--dbPassword <password>`: The password for the trail database. Defaults to `postgres`.
* `--dbPoolsize <size>`: The size of the trail DB pool. Defaults to `10`.
* `--dbTimeout <ms>`: The trail database idle timeout, in milliseconds. Defaults to `30000`.
* `--httpHost <host>`: The hostname the HTTP server is bound to. Defaults to `localhost`.
* `--httpPort <port>`: The port the HTTP server is bound to. Defaults to `8080`.
* `--noRESTAPI`: Switch indicating whether to disable the Trail's REST API. Defaults to `false`.
* `--noGraphql`: Switch indicating whether to disable the graphql query endpoint. Defaults to `false`.

Command line options take precedence over environment settings.

Expand Down
8 changes: 4 additions & 4 deletions packages/trail-hapi-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ For more information on the REST API, you can check the generated OpenAPI / Swag

The plugin takes the following configuration options:

* `logger`: A logger to be passed to the trails manager.
* `db`: Database settings for the trails manager.
* `pool`: A pre-configured database pool to be used by the trails manager; used in preference to any specified database settings.
* `trailsManager`: A pre-configured trails manager instance; used in preference to any of the previous settings.
* `logger`: A logger to be passed to the trails manager.
* `db`: Database settings for the trails manager.
* `pool`: A pre-configured database pool to be used by the trails manager; used in preference to any specified database settings.
* `trailsManager`: A pre-configured trails manager instance; used in preference to any of the previous settings.

## License

Expand Down
48 changes: 24 additions & 24 deletions packages/trail-hapi-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,35 +26,35 @@ This will start a server on `localhost:8080`. Swagger UI documentation is access

The server looks for the following environment variables:

* `TRAIL_DB_HOST`: The hostname for the trail database.
* `TRAIL_DB_PORT`: The port number for the trail database.
* `TRAIL_DB_NAME`: The name of the trail database.
* `TRAIL_DB_USERNAME`: The username for the trail database.
* `TRAIL_DB_PASSWORD`: The password for the trail database.
* `TRAIL_DB_POOL_SIZE`: The size of the trail DB pool.
* `TRAIL_DB_TIMEOUT`: The trail database idle timeout, in milliseconds.
* `TRAIL_HTTP_HOST`: The hostname the HTTP server is bound to.
* `TRAIL_HTTP_PORT`: The port the HTTP server is bound to.
* `TRAIL_LOG_LEVEL`: The logging level; defaults to `warn`.
* `TRAIL_DISABLE_REST_API`: Switch indicating whether to disable the REST API.
* `TRAIL_DISABLE_GRAPHQL`: Switch indicating whether to disable the graphql endpoint.
* `TRAIL_DB_HOST`: The hostname for the trail database.
* `TRAIL_DB_PORT`: The port number for the trail database.
* `TRAIL_DB_NAME`: The name of the trail database.
* `TRAIL_DB_USERNAME`: The username for the trail database.
* `TRAIL_DB_PASSWORD`: The password for the trail database.
* `TRAIL_DB_POOL_SIZE`: The size of the trail DB pool.
* `TRAIL_DB_TIMEOUT`: The trail database idle timeout, in milliseconds.
* `TRAIL_HTTP_HOST`: The hostname the HTTP server is bound to.
* `TRAIL_HTTP_PORT`: The port the HTTP server is bound to.
* `TRAIL_LOG_LEVEL`: The logging level; defaults to `warn`.
* `TRAIL_DISABLE_REST_API`: Switch indicating whether to disable the REST API.
* `TRAIL_DISABLE_GRAPHQL`: Switch indicating whether to disable the graphql endpoint.

These can also be defined using a `.env` file.

The server also takes the following command line options:

* `--dbHost <host>`: Set the database host name; defaults to `localhost`.
* `--dbPort <port>`: Set the database port; defaults to `5432`.
* `--dbName <name>`: Set the database name; defaults to `trails`.
* `--dbUsername <user>`: Set the database username; defaults to `postgres`.
* `--dbPassword <password>`: Set the database password; defaults to `postgres`.
* `--dbPoolsize <size>`: Set the database pool size; defaults to `10`.
* `--dbTimeout <ms>`: Set the database pool timeout, in milliseconds; defaults to `30000`.
* `--httpHost <host>`: Set the HTTP hostname; defaults to `localhost`.
* `--httpPort <port>`: Set the HTTP port; defaults to `8080`.
* `--logLevel <level>: Set the logger level; defaults to `warn`.
* `--noRESTAPI`: Switch to disable the REST API.
* `--noGraphQL`: Switch to disable the graphQL endpoint.
* `--dbHost <host>`: Set the database host name; defaults to `localhost`.
* `--dbPort <port>`: Set the database port; defaults to `5432`.
* `--dbName <name>`: Set the database name; defaults to `trails`.
* `--dbUsername <user>`: Set the database username; defaults to `postgres`.
* `--dbPassword <password>`: Set the database password; defaults to `postgres`.
* `--dbPoolsize <size>`: Set the database pool size; defaults to `10`.
* `--dbTimeout <ms>`: Set the database pool timeout, in milliseconds; defaults to `30000`.
* `--httpHost <host>`: Set the HTTP hostname; defaults to `localhost`.
* `--httpPort <port>`: Set the HTTP port; defaults to `8080`.
* `--logLevel <level>: Set the logger level; defaults to `warn`.
* `--noRESTAPI`: Switch to disable the REST API.
* `--noGraphQL`: Switch to disable the graphQL endpoint.

Command line options take precedence over environment variable settings.

Expand Down

0 comments on commit 36d4f97

Please sign in to comment.