Global config file
The ExpressoTS configuration file is located in the root folder of the project and it's called expressots.config.ts
.
This file is used to configure the CLI and the project behavior.
Here is the current configuration file with all the available options:
import { ExpressoConfig, Pattern } from "@expressots/shared";
const config: ExpressoConfig = {
entryPoint: "main",
sourceRoot: "src",
scaffoldPattern: Pattern.KEBAB_CASE,
opinionated: true,
scaffoldSchematics: {
entity: "entity",
provider: "provider",
module: "module",
controller: "controller",
dto: "dto",
middleware: "middleware",
usecase: "useCases",
},
};
export default config;
Configuration options
-
entryPoint: the entry point of the application to be executed by the CLI. Default:
main
-
sourceRoot: the root folder that will be used by the CLI to create the resources. Default:
src
-
scaffoldPattern: the pattern that will be used to create the resources. Default:
Pattern.KEBAB_CASE
. Example:user-create
-
opinionated: if true, the CLI will create the resources using the opinionated folder structure
-
scaffoldSchematics: the folder convention names for each resource. Default:
useCases
,entities
,providers
,middlewares
,controllers
,dtos
. With scaffold schematics you can customize the folder and resource names.
Scaffold schematics are only designed for the non-opinionated template. The opinionated template has a predefined structure.
Recommendations
Try to use as many different forms of creating resources as possible. This will help you to understand how the CLI works and how to use it in your favor. It also helps us improve the CLI to make it more robust.
Support us ❤️
ExpressoTS is an MIT-licensed open source project. It's an independent project with ongoing development made possible thanks to your support. If you'd like to help, please read our support guide.