npx vratix init
When you initialize your new API project using our CLI, you will see a .config/modules.json
file created.
It contains configurations the CLI uses when adding new modules to your project. See The CLI for more information.
NOTE: This configuration file is not required if you're copying code from our GitHub repo.
Most modifications to this file can break the CLI’s functionality, but here are a few things you can safely adjust if needed.
packageManger
Specifies the package manager used to install dependencies. Change this if you switch to a different package manager after initial setup.
{
"packageManger": "npm" | "pnpm" | "yarn",
}
docker
This property indicates whether Docker containers should be configured when installing new modules.
Set this to false
if you decide to stop using Docker.
{
"docker": true | false
}
schemaValidator
Defines the schema validator for request payloads. If you change the validator in your codebase, update this property so the CLI installs the correct dependencies accordingly.
{
"schemaValidator": "zod" | "yup" | "none"
}
database
Set your main database here. If you change databases, update this property so the CLI can install the appropriate DB repositories and schemas. See Databases for supported DB engines.
{
"database": "postgres"
}
folderOverrides
This section allows path overrides for core files in your Node.js project. Update these properties if you change the folder structure after initialization.
By default, the CLI considers
./src
as the root directory for all files. For example,"controllers": "controllers"
will store controller files in./src/controllers
.
folderOverrides.controllers
Specifies the folder path for storing controller files, where you’ll implement business logic.
{
"folderOverrides" : {
"controllers": "controllers"
}
}
folderOverrides.routes
Defines the location for endpoint route files.
{
"folderOverrides" : {
"routes": "routes"
}
}
folderOverrides.middleware
Sets the path for middleware files, allowing you to configure custom middleware for Express.js.
{
"folderOverrides" : {
"middleware": "middleware"
}
}
folderOverrides.utils
Specifies where helper and miscellaneous utility scripts are stored.
{
"folderOverrides" : {
"utils": "utils"
}
}