简体   繁体   中英

How to enable Hyperstack app in Rails 5 running on Heroku? Works fine on my Dev machine

Hyperstack updates to client data work locally but not after the app is deployed to Heroku.

We are using a small rails 5 app to explore how to combine legacy rails apps with Hyperstack capabilities.

Update the rails form (happens to be in Bootstrap), for example:

  .form-group
    = form.label :cargo, "Cargo", class: "col-md-4 control-label" 
    .col-md-8
      = form.text_area :cargo, class: "form-control"
   ...
  %p
  .actions
    = form.submit

React to the update event in the Hyperstack Dashboard:


      H5 { '(click to expand)' }

 Shipment.send(match.params[:scope]).search_for(@search_string.strip).each do |shipment|
        LI(class: 'roll365-list'){ ShipmentItem(shipment: shipment) }
      end #shipment```

An update to the Shipment form data should immediately update the Hyperstack dashboard page.  On Dev it does, on Heroku it doesn't.  This update is dynamic and occurs quickly so it's not terrible useful to display the effect in a static text!

You have to do a couple of things to enable push notifications via action-cable

See this issue for an explanation: https://github.com/hyperstack-org/hyperstack/issues/230

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM