- Server()
- Server.service()
- Server.use()
- Server.browserAssets()
- Server.buildClient()
- Server.publicServices()
- Server.process()
- Server.start()
Prism Server
Example:
var server = new Server({
root: '/my/app/dir',
dir: 'services',
log: console.log,
transport: require('rtt-engineio')(),
events: instanceOfAnEventEmitter,
sessionStore: new RedisStore({port: 6379}),
cacheSessions: true
});
Use a Realtime Service
Examples:
server.service('rpc', require('rts-rpc')())
Use pre-request middleware for rate limiting, message sanitizing etc
Works exactly like Express/Connect middleware
Examples:
server.use(require('ss-rate-limiter'));
Returns a list of all files which need to be sent to the browser
Builds a custom client module which includes the client-side transport and service code you need
Returns an array of non-private services which should be sent to the client
Process Incoming Request from a Realtime Transport
Examples:
server.process({message: '1|{"method": "callMe"}', socketId: 1234});
Start Server
Examples:
server.start(function() {
console.log("Realtime Server started on port %s", server.port);
});