@dotcom-tool-kit/next-router
v4.1.1
Published
Tool Kit plugin to run an application via the [`next-router`](https://github.com/financial-times/next-router) in a local environment (on the `run:local` hook).
Downloads
1,284
Readme
@dotcom-tool-kit/next-router
Tool Kit plugin to run an application via the next-router
in a local environment (on the run:local
hook).
Installation & usage
With Tool Kit already set up, install this plugin as a dev dependency:
npm install --save-dev @dotcom-tool-kit/next-router
And add it to your repo's .toolkitrc.yml
:
plugins:
- '@dotcom-tool-kit/next-router'
Running an app via next-router
For an app to be loaded via the next-router
(https://local.ft.com:5050), the app will need to be loaded before the next-router
plugin. This is done by assigning the run:local
command to run the application before NextRouter
task. Here is an example full config to do that:
plugins:
- '@dotcom-tool-kit/next-router'
- '@dotcom-tool-kit/nodemon'
- '@dotcom-tool-kit/doppler'
commands:
run:local:
- Nodemon
- NextRouter
options:
'@dotcom-tool-kit/next-router':
appName: appName # system's `name` field as it appears in next-service-registry
'@dotcom-tool-kit/doppler':
project: '[systemCode]' # corresponding doppler project name
Plugin-wide options
@dotcom-tool-kit/next-router
| Property | Description | Type |
| :----------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- |
| appName
(*) | The system's name
field as it appears in next-service-registry. This is often different to its Biz Ops system code, so be sure to check. | string
|
(*) Required.