-
Notifications
You must be signed in to change notification settings - Fork 0
- Q: How to running Web Socket API service?
- Q: How to enable Web Socket API connection?
- Q: How to configure SMTP server for send application email?
For running Web Socket API service, you need configure and start websocket_api daemon.
Configurations are stored at application.yml under WebSocket Streaming API settings section.
# WebSocket Streaming API settings
# --------------------------------------------------------------
WEBSOCKET_HOST: 0.0.0.0
WEBSOCKET_PORT: 8080
# Uncomment below to enable secure WebSocket (wss)
#WEBSOCKET_SSL_KEY: 'your_server.key'
#WEBSOCKET_SSL_CERT: 'your_server.crt'bundle exec daemon:websocket_api:start
bundle exec daemon:websocket_api:stopUse stream api client, please use official peatio-client-ruby rather than other third-party tools.
Note: The Peatio exchange doesn't rely on SMTP service in development mode, and there is a convenience way to review all send out mails by visit http://localhost:3000/mails.
For enable send email via a SMTP server in production server, the first thing is create an account at your email sending service. We highly recommend Mailgun, You could also use Amazon SES, but Gmail is not recommended production websites!
Once your account is prepared, you need to add or modify following configuration information at config/application.yml, then restart both web server and notification daemon.
# below settings only in production env
# system notify mail settings
# --------------------------------------------------------------
SMTP_PORT: 587
SMTP_DOMAIN: your_domain.com
SMTP_ADDRESS: smtp.mailgun.org
SMTP_USERNAME: your_mailgun_account
SMTP_PASSWORD: your_mailgun_password
SMTP_AUTHENTICATION: plainbundle exec rake daemon:notification:stop
bundle exec rake daemon:notification:start