DylanPiercey on master
Update request.md chore: short… (compare)
DylanPiercey on master
Update response.md chore: upda… (compare)
DylanPiercey on master
Update request.md chore: updat… (compare)
DylanPiercey on master
Update README.md chore: update… (compare)
DylanPiercey on v7.0.4
DylanPiercey on master
Improve typings. 7.0.4 (compare)
DylanPiercey on v7.0.3
DylanPiercey on master
Add type definitions for tls op… 7.0.3 (compare)
DylanPiercey on platform-agnostic
DylanPiercey on file-size
DylanPiercey on add-code-of-conduct-1
DylanPiercey on v7.0.2
DylanPiercey on master
Update size in readme 7.0.2 (compare)
DylanPiercey on v7.0.1
DylanPiercey on master
* Update example links in readm… 7.0.1 (compare)
DylanPiercey on master
* Update changelog. * Release 7… 7.0.0 (compare)
DylanPiercey on v7.0.0
DylanPiercey on v7.0.0-rc.12
DylanPiercey on master
Remove default of 404 on status… 7.0.0-rc.12 (compare)
DylanPiercey on master
* Organize types in namespace. … 7.0.0-rc.11 (compare)
Right, it's a cool idea but I think at that point it would be best to wrap @rill/http instead of Rill. It wouldn't be too hard to fork express and use @rill/http in place of http to achieve a similar result with less overhead and more compatibility.
The reason I haven't done something like this is that I believe using express middleware in the browser can be dangerous because you don't necessarily know if the code is optimized for the browser or server, or if it will even work. With any middleware in the rill-org you are guaranteed that the middleware will work appropriately in both environments.
#setup
method, where you can do stuff like app.setup(expressAdapter)
which is essentially your transformer. I just wouldn't add something like that to the org because I can see it being far to easy for developers (whom in my experience seem to already have a hard time distinguishing client and server with this approach) to shoot themselves in the foot.
ctx.go(ctx.req.href)
// Here we listen for `keyup` events that match a `.verification-code` element.
delegate.on('keyup', '.verification-code', (ev, go) => {
// `currentTarget` will be the element that matched the selector.
const input = ev.currentTarget;
const code = input.value
// The second argument is the 'go' utility, which is much like native fetch but tells Rill to navigate.
if (code.length === 5) {
// In this case when we have 5 characters, we navigate to the submission page.
go('/submit', {
method: 'POST',
body: { code }
})
}
})
ctx.req.original.socket.server
within this:function delegate (options) {
return function delegateMiddleware (ctx, next) {
// Store reference to server for later.
_server = ctx.req.original.socket.server
// Clear all listeners.
for (var type in _listeners) _listeners[type] = []
// Continue request.
return next()
}
}