Hello, and first of all thank you for your framewok.
It's my first experience with node, and I wanted to do a "hands on" thing, so didn't go much through the docs. But now that I'm finding some problems, even the docs aren't helping.
I'm developing a hobby website, it's an information aggregator/dashboard for cryptocurrencies, an alpha/proof-of-concept is available at
http://1dash.netI'm having some strange issues with controllers.
Two days ago I defined a websocket with some routes. They didn't work. When I moved the websockets to a diffrent file, they did work. Now they are sitting in a dedicated file.
This is the controller that didn't work (moved the websocket)
exports.install = function(framework) {
framework.route('/exchanges', get_exchange_list);
framework.route('/exchanges/{exchange}/{left}/{right}', get_exchange);
framework.websocket('/exchangesws/{exchange}/{left}/{right}', get_exchange_updates, ['json']);
};Then yesterday I had an issue with ['authorize']. It looked like the
order of the routes mattered when I define the routes, so I had to set them up this way:
exports.install = function(framework) {
framework.route('/', view_homepage_logged, ['authorize']);
framework.route('/', view_homepage);
[...]
}But now (I may have updated the framework version by accident, can't remember) it isn't working again, and both logged-in and not-logged-in users get the same route.
(this seems to be fixed if I invert the order again).
So can I ask what is the recomended order for routing, and what could have been the issue with the websockets?
Thank you for your time, and as a first timer to node, I find your framework very useful, (these issues aside) it's really out-of-the-way and gives a lot of freedom.