For the most concise docs, run:
gramps <command> --help
gramps dev
Start a gateway (server) for development.
$ gramps dev [options]
--data-source <path> [path..]
(aliases: --data-sources
, -d
)
Optional flag to specify which data source(s) to run locally for development. GrAMPS will look in the provided directory’s root and src
directory for data source files.
# Run the default development gateway with a single data sourcegramps dev --data-source ./data-source-one# Run the default development gateway with two data sourcesgramps dev --data-sources ./data-source-one ./data-source-two# Run the default development gateway with two data sources use shorthandgramps dev -d ./data-source-one ./data-source-two
NOTE: Unless the
--no-transpile
flag is set, the data source files will be transpiled using Babel with GrAMPS default settings.
--gateway <path>
(alias: -g
)
Optional flag to specify a custom gateway for development. This gateway is not transpiled, so point to your build folder if your code requires transpilation.
# Run a custom gatewaygramps dev --gateway ./gateway.js# Run a custom gateway plus a local data sourcegramps dev --gateway ./gateway.js --data-source ./data-source-one
--mock
Optional flag to enable data mocking.
This option has an opposite — --live
— which is enabled by default and is therefore never necessary to set explicitly. However, it can be useful if you want to be very clear about what kind of data is being used.
# Run the default development gateway in mock modegramps dev --mock# Run a custom gateway in mock modegramps dev -g ./gateway.js --mock# Explicitly run a custom gateway in live modegramps dev -g ./gateway.js --live
--no-transpile
An optional flag to disable transpilation of data sources via Babel. If this is set, the data source path needs to point to code that is already built and/or does not require transpilation to run properly.
# Run the default development gateway with an untranspiled data sourcegramps dev -d ./data-source-one --no-transpile
This option has an opposite — --transpile
— but this is enabled by default and therefore is never required to be set explicitly.