{"_id":"55fa45b2aba81f0d00a115de","user":"55df3f52ddfb40170061cf96","__v":9,"githubsync":"","version":{"_id":"55df3f6486ae7f0d00db4ca5","__v":7,"project":"55df3f6386ae7f0d00db4ca2","createdAt":"2015-08-27T16:48:36.339Z","releaseDate":"2015-08-27T16:48:36.339Z","categories":["55df3f6486ae7f0d00db4ca6","55e1376cd052580d0038c9b9","55e1391926f51b0d009b1778","55e1d40a7d91840d008249ea","55e1d6e27d91840d008249eb","55e20132d052580d0038ca67","55fe3726473f380d000b268a"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"category":{"_id":"55e1391926f51b0d009b1778","pages":["55fa45b2aba81f0d00a115de"],"project":"55df3f6386ae7f0d00db4ca2","version":"55df3f6486ae7f0d00db4ca5","__v":1,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-08-29T04:46:17.687Z","from_sync":false,"order":1,"slug":"configuration","title":"Configuration"},"project":"55df3f6386ae7f0d00db4ca2","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-09-17T04:46:42.481Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"1. Configure log level\"\n}\n[/block]\nIf you are using docker or running this on your own server, or just debugging some issues, you might need to set the log level to a lower level.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"loglevel: 'error'\\n\\n//\\tYou can also set this in the environment \\nLOG_LEVEL = verbose\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"property name\",\n    \"h-1\": \"description\",\n    \"h-2\": \"default\",\n    \"0-2\": \"error\",\n    \"0-0\": \"loglevel\",\n    \"0-1\": \"the log level for the entire yaas server\"\n  },\n  \"cols\": 3,\n  \"rows\": 1\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Log levels\",\n  \"body\": \"if you want everything (debugging, information, and verbose), set the log level to verbose so you know everything happening in the server, set the log level to `verbose`\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"2. Configure concurrency\"\n}\n[/block]\nyaas use background workers to handle all incoming requests, for each type of request, server allocate number of processes to handle them, if you have a really powerful machine, you can set this to a higher number.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"concurrency: 3 //  IMPORTANT: if you don't specify this, we will use number of processor you have as concurrency\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"4. Configure HMAC secret\"\n}\n[/block]\nwhen yaas is running in a closed environment, you can specify the entire config json object using a encrypted hash, server then will pick the hash and decrypt with the HMAC secret and load the config.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HMACSecret: '909957e0fe0b9d8197e44e6daeee9336'\\n\\n//\\tYou can also set this in the environment \\nSECRET = 909957e0fe0b9d8197e44e6daeee9336\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"5. Configure autoclean feature\"\n}\n[/block]\nwhen yaas is finished with a background task, the task remains in the database as completed task that can be referenced later as a log, you can also let yaas to clear this log automatically by setting `autoclean` to true\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"autoclean: false\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"6. Configure kue admin panel\"\n}\n[/block]\nyaas use `kue` to manage background task, if you want to manage jobs you can go to the admin panel for kue and manage all the tasks in the system\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"ui: {\\n            apiURL: '/api', // IMPORTANT: specify the api url\\n            baseURL: '/kue', // IMPORTANT: specify the base url\\n            updateInterval: 2000 // Optional: Fetches new data every 5000 ms\\n}\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Notice\",\n  \"body\": \"the kue admin panel can be accessed by anyone, but in v1.5 we will secure this\"\n}\n[/block]","excerpt":"want yaas to work better for you?","slug":"advanced-configuration","type":"basic","title":"Advanced Configuration"}

Advanced Configuration

want yaas to work better for you?

[block:api-header] { "type": "basic", "title": "1. Configure log level" } [/block] If you are using docker or running this on your own server, or just debugging some issues, you might need to set the log level to a lower level. [block:code] { "codes": [ { "code": "loglevel: 'error'\n\n//\tYou can also set this in the environment \nLOG_LEVEL = verbose", "language": "javascript" } ] } [/block] [block:parameters] { "data": { "h-0": "property name", "h-1": "description", "h-2": "default", "0-2": "error", "0-0": "loglevel", "0-1": "the log level for the entire yaas server" }, "cols": 3, "rows": 1 } [/block] [block:callout] { "type": "info", "title": "Log levels", "body": "if you want everything (debugging, information, and verbose), set the log level to verbose so you know everything happening in the server, set the log level to `verbose`" } [/block] [block:api-header] { "type": "basic", "title": "2. Configure concurrency" } [/block] yaas use background workers to handle all incoming requests, for each type of request, server allocate number of processes to handle them, if you have a really powerful machine, you can set this to a higher number. [block:code] { "codes": [ { "code": "concurrency: 3 // IMPORTANT: if you don't specify this, we will use number of processor you have as concurrency", "language": "javascript" } ] } [/block] [block:api-header] { "type": "basic", "title": "4. Configure HMAC secret" } [/block] when yaas is running in a closed environment, you can specify the entire config json object using a encrypted hash, server then will pick the hash and decrypt with the HMAC secret and load the config. [block:code] { "codes": [ { "code": "HMACSecret: '909957e0fe0b9d8197e44e6daeee9336'\n\n//\tYou can also set this in the environment \nSECRET = 909957e0fe0b9d8197e44e6daeee9336", "language": "javascript" } ] } [/block] [block:api-header] { "type": "basic", "title": "5. Configure autoclean feature" } [/block] when yaas is finished with a background task, the task remains in the database as completed task that can be referenced later as a log, you can also let yaas to clear this log automatically by setting `autoclean` to true [block:code] { "codes": [ { "code": "autoclean: false", "language": "javascript" } ] } [/block] [block:api-header] { "type": "basic", "title": "6. Configure kue admin panel" } [/block] yaas use `kue` to manage background task, if you want to manage jobs you can go to the admin panel for kue and manage all the tasks in the system [block:code] { "codes": [ { "code": "ui: {\n apiURL: '/api', // IMPORTANT: specify the api url\n baseURL: '/kue', // IMPORTANT: specify the base url\n updateInterval: 2000 // Optional: Fetches new data every 5000 ms\n}", "language": "javascript" } ] } [/block] [block:callout] { "type": "warning", "title": "Notice", "body": "the kue admin panel can be accessed by anyone, but in v1.5 we will secure this" } [/block]