Skip to content

API Maker Configurations

API Maker settings

  • package.json file contains all the configurations of API Maker.
  • You can override those configurations from .env file.
    • To override prefix with am__.
    • Ex: port from package.json can be written as am__port in .env file.
    • Ex: jwtOptions.issuer from package.json can be written as am__jwtOptions__issuer in .env file and . will be replaced with __
  • you can define .env path by passing process level argument.
    • node main.js --envPath=~/config/.env
serverName It will be seen in nodes summary dashboard, so you can easily identify different servers.
"Default" : "server1"
processTitle This will be title of API Maker process when it starts.
"Default" : "api_maker_be"
cpuCount 1 = default. One API Maker process will be created.
AUTO = If you give this value, it will create N number of processes where N = CPU core.
2 = It will create 2 API Maker processes.
"Default" : "1"
port API Maker will start on this port.
"Default" : "38246"
wsPort API Maker will start WebSocket connection on this port. So frontend or mobile app can connect to this port for WebSocket notifications. ```json "Default" : "38245" ```
mongo_db_connection Database connection string of API Maker`s internal use.
enableLogs If true, logging is enable.
"Default" : "true"
mongo_db_connection_logs Logging database connection string. API Maker will store user's logs in this database.
logRemoveSchedulerInterval API Maker will start log removal scheduler based on this value.
Default is every day.
"Default" : "0 0 0 * * *"
maxLogsCount Maximum amount of logs to keep in log database.
API Maker will run scheduler based on `logRemoveSchedulerInterval` and remove older logs.
"Default" : "100000"
Used by API Maker for it's internal use.
It stores user's auto increment values in this redis.
Clustering supported.
nodes List of redis nodes.
port Internal redis port.
"Default" : "6379"
host Internal redis host.
"Default" : ""
pass Internal redis password.
Used to give caching support for user's APIs.
Clustering supported.
nodes List of redis nodes.
port External redis port.
"Default" : "6390"
host External redis host.
"Default" : ""
pass External redis password.
otherRedisClusterOptions Other redis cluster related options supported by ioredis NPM Package.
redisValueExpireInSeconds Every key set by user in redis will expire automatically after this many seconds.
It will keep redis clean.
Ex : If you set value 29 over here, it means every key in redis expires after 29 seconds or TTL given by user while setting the key.
"Default" : "7200"
maxCharsResToCache 1000000 = If value has more than 1000000 characters, it will not be stored in redis.
We should not store huge strings in redis.
"Default" : "1000000"
expiresIn We can specify Token expire time limit from here, it should be always number in seconds.
"Default" : "259200"    // 72 hours
issuer Specify the API Maker issuer of JWT generator.
"Default" : "API Maker JWT Generator"
imageName: { sandboxNode : }
"Default": "am/sandbox-node, nodejs sandbox image name"
sandboxReqTimeout Defines the maximum milliSecond allowed to complete the execution process.
"Default" : "13000"
sandboxCountForAdmin Process will create these many sandbox environment containers to handle multiple requests.
"Default" : "2"
removeSandboxInactiveSinceMinutes Remove sandbox of admins which is not used since this minutes to free resources. For that scheduler will run every (removeSandboxInactiveCron = 10) minutes to check these minutes.
"Default" : "5"
(Note : We can give like 0.25 float value also)
apiUserPass Here, we can set password for the default API User.
"Default" : "12345"
passCommunication Used for communication between API Maker frontend and API Maker backend.
It's value should be same for all environments of that project in all server deployment.
passJWT Used for generating jwt token.
It's value should be same for all environments of that project in all server deployment.
passDBEncryptDecrypt Values in API Maker mongoDB database and passwords in git repository, will be encrypted using this password.
It's value should be same for all environments of that project in all server deployment.
If value is not same, API Maker will not able to decrypt git repository values.
feTransferDataValidityInSecondsDefault Encrypted data sent by frontend or mobile apps, will be expired after this many seconds.
"Default" : "15"
refreshTokenValidForS Refresh token will be valid after these many seconds of expiring access token.
"Default" : "900"
importDefaultUsers API Maker will insert default users from this JSON file when these emails are not present in API Maker's MongoDB.
"Default" : "src/json/DefaultUsers.json"
compressThreshold If response is greater than 51200 characters then it will be compressed otherwise not.
"Defaults" : "51200" 
bodyLimit Defines the maximum payload in bytes, the server is allowed to accept.
"Default" : "10484711424" (9999MiB) 
Google: Byte -> Mebibyte(MiB)
cron_job_time_zone API Maker's internal schedulers will run on this time zone.
"Default" : "Asia/Kolkata"
store_url API Maker will install APIs from store from below URL.
"Default" : ""
maximum_test_user_count Fetch maximum these many test usernames from table if count is not provided in schema
"Default" : "1000"
uploadedFileCleaningSchedulerCron Scheduler will run every this much time and clean files which are older than uploadedFileRemoveOlderThanThisTimeInSeconds.
Default : 30 minutes
"Default" : "0 */30 * * * *"
uploadedFileRemoveOlderThanThisTimeInSeconds Remove uploaded files older than time specified in second at this field.
Default : 1800 seconds (30 Minutes)
"Default" : "1800"