These are chat archives for jdubray/sam
// Time Travel is initialized in a couple of lines (server-model.js) var myTimeTraveler = safe.defaultTimeTraveler() ; // or your implementation safe.initTimeTraveler(myTimeTraveler) ; // add the express route to access the model versions myTimeTraveler.init(app,your_path_to_timetravel_snapshots) ; // SAFE's implements an in memory defaultSnapShotStore, which you can replace with your own, including a persistent one...
SAFE's defautTimeTravel implementation adds a "Time Travel" component to all state representations so you can easily pick the snapshot you'd like to go back to.
You can also access the time travel store via a simple api:
Return all snapshots:
Return a single snapshot:
Of course SAFE also works on the client (SAFE has no dependency whatsoever).