Skip to content

📦 Realtime Trailpack. Synchronize the client and server via WebSockets

License

Notifications You must be signed in to change notification settings

KevinGruber/trailpack-realtime

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

trailpack-realtime

📦 Realtime Trailpack. Synchronize the client and server via WebSockets

Getting Started

Install

npm install --save trailpack-realtime

Then edit config/main.js

packs: [
    require('trailpack-core'),
    require('trailpack-repl'),
    require('trailpack-router'),
    require('trailpack-express'), 
    require('trailpack-realtime')
  ],

Configure

Create the config file: config/realtime.js

module.exports = {
  primus:{
    options:{
      //these options are passed directly to the Primus constructor: https://github.com/primus/primus#getting-started
    }
  } 
};

Client

You can include the primus client library as a script:

<script src="/primus/primus.js"></script>

About

📦 Realtime Trailpack. Synchronize the client and server via WebSockets

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%