stix-wetland
Setup
If you initialized a new stix project using the boards cli stix preset, stix-wetland will already be included in your project and you can move on to the using section. If not, keep reading.
- In your stix project, simply run
yarn add stix-wetland. - Add the module to your project's
src/config/modules.ts:
import { ModuleManagerConfigInterface } from 'stix';
import { Wetland } from 'stix-wetland';
export const modules: ModuleManagerConfigInterface = [
Wetland,
// Your other modules.
];
Setting up wetland
Configuring wetland can be done by adding a wetland key to your config.
- Add
export * from './wetland';to yoursrc/config/index.ts. - Create a file at
src/config/wetland.tsand addexport const wetland = {}to it. - Configure wetland to your heart's desire.
You can find more info about the configuration options in the wetland documentation.
Note: Due to the nature of stix's module system, all configs conveniently get merged. This means that you could add a config/wetland.ts to each of your modules specifying the entityPaths[] for those module's entities.
Config
stix-wetland doesn't come with a whole lot of special configuration options apart from the ones wetland provides.
There's one additional configuration option, which is devMigrations which by default this looks at the NODE_ENV or WETLAND_DEV_MIGRATIONS.
As long as NODE_ENV is not 'production' or WETLAND_DEV_MIGRATIONS is set, stix-wetland will run your dev migrations for you.
Read more about the configuration options in the wetland documentation.