mirror of
https://github.com/gundb/panic-server.git
synced 2026-05-07 03:00:26 -04:00
53faba380b47bc2153b33d724b130876255820f6
Server code now powered by socket.io, basic serving logic and events. With luck, soon I'll have the socket sending out request events that are handled by the test stack. Some dependencies were no longer necessary, so they've been removed from `package.json`. Some code was no longer needed, so it was removed (the server events file)
Panic
A distributed testing framework designed for and built by the team at gunDB.
under development
Rough API draft
test('Client/server sync', function () {
// set env variables
this.env({
url: 'http://localhost/gun'
})
// on every platform
this.use(function () {
this.env.db = new Gun(
this.env.url
)
})
// only on browsers
this.client(function (client) {
client.env.db.get('update').put({
data: true
})
})
// only on node clients
this.server(function (server) {
this.env.db.get('update').val(this.done)
}, 15000)
// 15 second timeout, run on the server
})
More sketches in notes.js
Description
Languages
JavaScript
100%