File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ PROJECT_THRESHOLD_MEMORY=1024
77PROJECT_MAX_MEMORY = 2048 # 2GB
88PROJECT_AUTO_DOWNLOAD_MEDIA = true
99PROJECT_MAX_DOWNLOAD_MEDIA = 25 # 25MB
10+ NODE_ENV = development
1011
1112P_QUEUE_CONCURRENCY_COUNT = 2
1213
@@ -16,10 +17,6 @@ PHISHTANK_AUTO_UPDATE=true
1617
1718SENTRY_DNS =
1819
19- # whether to enable debug mode
20- # in debug mode, additional logging is enabled
21- DEBUG = true
22-
2320# the command prefix used to trigger bot commands
2421COMMAND_PREFIX = !
2522
Original file line number Diff line number Diff line change @@ -83,14 +83,14 @@ Canis supports multiple AI providers out of the box:
8383 | ` PHISHTANK_UPDATE_HOUR ` | ❌ | Hour to run daily update (UTC) | ` 3 ` |
8484 | ` PHISHTANK_AUTO_UPDATE ` | ❌ | Automatically update PhishTank data | ` true ` |
8585 | ` SENTRY_DNS ` | ❌ | Sentry DSN for error tracking | |
86- | ` DEBUG ` | ❌ | Enable debug mode for extra logging | ` true ` |
86+ | ` NODE_ENV ` | ✅ | Environment | ` development ` |
8787 | ` COMMAND_PREFIX ` | ❌ | The command prefix used by the bot | ` ! ` |
8888 | ` COMMAND_PREFIX_LESS ` | ❌ | Allow commands without prefix | ` true ` |
89- | ` PORT ` | ✅ | Port for running the server | ` 3000 ` |
89+ | ` PORT ` | ✅ | Port for running the server | ` 3000 ` |
9090 | ` PUPPETEER_EXEC_PATH ` | ❌ | Path to Chrome/Edge/Brave/Firefox for Puppeteer | ` /opt/google/chrome/google-chrome ` |
9191 | ` AUTO_RELOAD ` | ❌ | Reload command files automatically when edited | ` false ` |
92- | ` DATABASE_URL ` | ✅ | MySQL database connection URL | ` mysql://root@127.0.0.1:3306/project_canis ` |
93- | ` REDIS_URL ` | ✅ | Redis connection URL | ` redis://127.0.0.1:6379 ` |
92+ | ` DATABASE_URL ` | ✅ | MySQL database connection URL | ` mysql://root@127.0.0.1:3306/project_canis ` |
93+ | ` REDIS_URL ` | ✅ | Redis connection URL | ` redis://127.0.0.1:6379 ` |
9494 | ` AI_PROVIDER ` | ❌ | Preferred AI provider (` groq ` , ` openrouter ` , etc.) | ` groq ` |
9595 | ` OPEN_ROUTER_API_KEY ` | ❌ | API key for OpenRouter | |
9696 | ` OPEN_ROUTER_MODEL ` | ❌ | OpenRouter model to use | ` moonshotai/kimi-k2:free ` |
Original file line number Diff line number Diff line change 11import log from "npmlog" ;
22
3- if ( process . env . DEBUG === "false " ) {
3+ if ( process . env . NODE_ENV === "production " ) {
44 const methodsToPatch = [ "error" , "warn" ] ;
55
66 for ( const method of methodsToPatch ) {
Original file line number Diff line number Diff line change 11import dotenv from "dotenv" ;
2- dotenv . config ( { quiet : true , debug : process . env . DEBUG === "true " } ) ;
2+ dotenv . config ( { quiet : true , debug : process . env . NODE_ENV === "production " } ) ;
33
44import "./instrument" ;
55import { registerCronJobs } from "./cron" ;
Original file line number Diff line number Diff line change @@ -5,5 +5,5 @@ Sentry.init({
55 // Setting this option to true will send default PII data to Sentry.
66 // For example, automatic IP address collection on events
77 sendDefaultPii : false ,
8- enabled : process . env . DEBUG !== "true ",
8+ enabled : process . env . NODE_ENV === "production ",
99} ) ;
Original file line number Diff line number Diff line change 11import dotenv from "dotenv" ;
2- dotenv . config ( { quiet : true , debug : process . env . DEBUG === "true" } ) ;
2+ dotenv . config ( ) ;
33import * as Sentry from "@sentry/node" ;
44
55Sentry . init ( {
66 dsn : process . env . SENTRY_DNS || "" ,
77 // Setting this option to true will send default PII data to Sentry.
88 // For example, automatic IP address collection on events
99 sendDefaultPii : false ,
10- enabled : process . env . DEBUG !== "true" ,
1110} ) ;
1211
1312const test =
You can’t perform that action at this time.
0 commit comments