Skip to content
Daniel Lv edited this page Mar 21, 2015 · 20 revisions

Question list


Q: How to running Web Socket API service?

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'
About start and stop web socket api daemon
bundle exec daemon:websocket_api:start
bundle exec daemon:websocket_api:stop

Q: How to enable Web Socket API connection?

Use stream api client, please use official peatio-client-ruby rather than other third-party tools.

Q: How to configure SMTP server for send application email?

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: plain
About restart notification daemon:
bundle exec rake daemon:notification:stop
bundle exec rake daemon:notification:start
Clone this wiki locally