-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure to set COSGO_DESTINATION and SENDGRID_KEY variables in heroku.
I added a sendgrid key for quick setup
- Loading branch information
Showing
4 changed files
with
25 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
web: cosgo -quiet -debug -port=$PORT | ||
web: cosgo -quiet -nolog -mailmode sendgrid -port=$PORT $FLAGS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,11 +36,24 @@ func quickSelfTest() (err error) { | |
return errors.New("Fatal: environmental variable `MANDRILL_KEY` is Crucial.\n\n\t\tHint: export MANDRILL_KEY=123456789") | ||
|
||
} | ||
if cosgoDestination == "" { | ||
cosgoDestination = os.Getenv("COSGO_DESTINATION") | ||
if cosgoDestination == "" { | ||
return errors.New("Fatal: environmental variable `COSGO_DESTINATION` is Crucial.\n\n\t\tHint: export [email protected]") | ||
} | ||
} | ||
case smtpsendgrid: | ||
sendgridKey = os.Getenv("SENDGRID_KEY") | ||
if sendgridKey == "" { | ||
return errors.New("Fatal: environmental variable `SENDGRID_KEY` is Crucial.\n\n\t\tHint: export SENDGRID_KEY=123456789") | ||
|
||
sendgridKey = "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" | ||
log.Println("Warning: Set SENDGRID_KEY variable for production usage.") | ||
// return errors.New("Fatal: environmental variable `SENDGRID_KEY` is Crucial.\n\n\t\tHint: export SENDGRID_KEY=123456789") | ||
} | ||
if cosgoDestination == "" { | ||
cosgoDestination = os.Getenv("COSGO_DESTINATION") | ||
if cosgoDestination == "" { | ||
return errors.New("Fatal: environmental variable `COSGO_DESTINATION` is Crucial.\n\n\t\tHint: export [email protected]") | ||
} | ||
} | ||
default: | ||
// No mailmode, going for mailbox. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters