Added config option for websocket port, and reworked the config parsing a bit.

Added SMTP_FROM config to examples and made it mandatory, it doesn't make much sense to not specify the from address.
This commit is contained in:
Daniel García
2018-09-13 20:59:51 +02:00
parent 9cdb605659
commit 948554a20f
6 changed files with 89 additions and 48 deletions

View File

@@ -5,6 +5,8 @@ use api::JsonResult;
use auth::Headers;
use db::DbConn;
use CONFIG;
pub fn routes() -> Vec<Route> {
routes![negotiate, websockets_err]
}
@@ -356,7 +358,7 @@ pub fn start_notification_server() -> WebSocketUsers {
thread::spawn(move || {
WebSocket::new(factory)
.unwrap()
.listen("0.0.0.0:3012")
.listen(format!("0.0.0.0:{}", CONFIG.websocket_port))
.unwrap();
});