00:10:27  * joshonthewebquit (Read error: Connection reset by peer)
00:23:40  * HairAndBeardGuy_joined
00:27:29  * HairAndBeardGuyquit (Ping timeout: 264 seconds)
00:30:13  * HairAndBeardGuy_quit (Ping timeout: 265 seconds)
01:06:33  * kazuponjoined
01:10:24  * eh_effquit (Ping timeout: 255 seconds)
01:12:16  * kazupon_joined
01:12:28  * eh_effjoined
01:15:53  * kazuponquit (Ping timeout: 240 seconds)
01:33:15  * kazupon_quit (Remote host closed the connection)
01:36:41  * kazuponjoined
02:01:59  * TheAceOfHeartsquit (Ping timeout: 250 seconds)
02:03:27  * kazuponquit (Remote host closed the connection)
02:11:29  * mkoquit (Ping timeout: 258 seconds)
02:23:07  * kazuponjoined
02:24:36  * eh_effquit (Ping timeout: 250 seconds)
02:31:23  * joshonthewebjoined
02:31:54  * HairAndBeardGuyjoined
02:39:15  * LeXXikjoined
02:45:39  * joshonthewebquit (Quit: Computer has gone to sleep.)
02:47:01  * stagasjoined
02:57:43  * TheAceOfHeartsjoined
02:58:11  * TheAceOfHeartsquit (Client Quit)
03:02:14  * TheAceOfHeartsjoined
03:04:59  * bmacjoined
03:11:01  * joshonthewebjoined
03:13:55  * ajk27quit (Ping timeout: 250 seconds)
03:16:57  * TheAceOfHeartsquit (Quit: Leaving.)
03:21:26  * TheAceOfHeartsjoined
03:22:47  * ajk27joined
03:38:52  * bmacquit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
04:14:16  * joshonthewebquit (Quit: Computer has gone to sleep.)
04:27:39  * bmacjoined
04:33:17  * mkojoined
04:36:04  * eh_effjoined
04:38:17  * kazuponquit (Remote host closed the connection)
04:44:55  * Tonisiusjoined
04:45:02  <Tonisius>This is smaller than I thought.
04:45:16  <TheAceOfHearts>That's not what she said~
04:46:01  <Tonisius>using koa-resource-router and koa-router, how do I create a koa-route from say /api to a koa-resource-router to /devices: /api/devices ?
04:47:03  <TheAceOfHearts>I'm not sure I understand
04:47:13  <TheAceOfHearts>oh
04:47:21  <TheAceOfHearts>I think you just want to use koa-mount
04:48:39  <Tonisius>I have koa-mount at the /api : //app.use(mount('/api', APIRouter.middleware())); but I don't know how to attach the device koa-resource-router to that
04:49:11  <Tonisius>is it really that messy to attach multiple resources to a router?
04:49:22  <Tonisius>I have been scouring for examples, and I'm unable to find one.
04:49:36  <TheAceOfHearts>I just use one router, idk
04:49:41  <TheAceOfHearts>I'm not sure what you wanna do
04:50:13  <TheAceOfHearts>can't you just mount it right after?
04:50:18  <Tonisius>one router at /api to delegate to multiple koa-resource-router s, and mount at one point.
04:50:47  <Tonisius>I tried, and it's ignored. app.use(mount('/api', APIRouter.middleware())); app.use(mount('/api/devices', devicesRoute.middleware()));
04:51:09  <TheAceOfHearts>shouldn't you mount em all in /api?
04:51:20  * Tonisiustries that
04:51:50  <TheAceOfHearts>you can just use compose too, I guess
04:51:53  <Tonisius>oh... that works... I guess it's some sort of `next` being called in there.
04:52:03  <Tonisius>yeah, I think that's what it's doing.
04:52:08  <TheAceOfHearts>https://www.dropbox.com/s/7fu3hshzf7eiybc/Screenshot%202014-11-05%2020.51.58.png?dl=0 I did this in an app that had fucked up routes
04:52:34  <Tonisius>oh, that's how it works in this situation
04:53:13  <TheAceOfHearts>I mean, I'd suggest avoiding such complex routes if possible
04:53:22  <TheAceOfHearts>but that's one way you could do it I guess
04:54:01  <Tonisius>so if I need resources at /api/devices /api/status /api/types , how would you suggest a solution?
04:54:20  <Tonisius>I've been tackling this for about a week now, learning NodeJs, even attended a meetup, which was interesting.
04:54:26  <TheAceOfHearts>it depends on how you're structuring your app
04:55:00  <Tonisius>the /api is for restful resources, I could version it out as needed.
04:55:06  <TheAceOfHearts>I've seen a few examples, I'm not sure which one I like most, tbh
04:55:36  <TheAceOfHearts>the koan guy just passes the app to the controllers
04:55:40  <TheAceOfHearts>and they hook into it themselves
04:55:43  <Tonisius>I've seen some, and they are large, and over arching, and I don't see koa-resource being used.
04:55:52  <TheAceOfHearts>I don't use koa-resource either, tbh
04:56:16  * bmacquit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
04:56:17  <Tonisius>I liked the layout of automated resource access, similar to how RoR does it.
04:56:43  <TheAceOfHearts>I like explicitness
04:56:46  <TheAceOfHearts>I <3 Rails for some stuff, though
04:56:50  <TheAceOfHearts>lemme take a look
04:57:07  <TheAceOfHearts>what router are you using?
04:57:12  <Tonisius>koa-router.
04:57:26  <Tonisius>just about everything is koa-*
04:57:36  <Tonisius>except for knex and bookshelf
04:57:49  <TheAceOfHearts>oh~
04:58:05  <TheAceOfHearts>why'd you pick knex and bookshelf? I had to pick between that an sequelize and went with sequelize
04:58:53  <Tonisius>It's the only one I had explored, I also saw waterline
04:58:59  <Tonisius>I stuck with one.
04:59:14  <TheAceOfHearts>waterline is only good inside of sailsjs tbh
04:59:16  <Tonisius>but only through koa-mvc, and that is a broken app.
04:59:35  <Tonisius>koa-mvc was not tested at all with postgres, so that as an example was a waste for me.
04:59:47  <TheAceOfHearts>I'm currently setting up a scaffold for a Rails-style koa app
04:59:56  <TheAceOfHearts>but it's for lulz
04:59:57  <TheAceOfHearts>and playing around
05:00:04  <TheAceOfHearts>I'm not sure I'd genuinely suggest using it
05:00:11  <Tonisius>I wouldn't
05:00:24  <Tonisius>I'll go with koa-resource and compose.
05:00:28  <TheAceOfHearts>sure
05:00:37  <Tonisius>for the meantime, it will keep it small, and I figured simple.
05:00:41  <TheAceOfHearts>yeah
05:00:53  <TheAceOfHearts>I think the scaffold I'm making provides a few examples of how you can do certain things, though
05:01:11  <TheAceOfHearts>that's sorta my goal, to show it to my Rails friends and be like: this is sorta the equivalent built with koa
05:01:50  <Tonisius>koa mvc was supposed to be it, no?
05:02:00  <TheAceOfHearts>I haven't looked at koa-mvc
05:02:21  <Tonisius>it's broken a bit, with postgresql that is.
05:02:32  <TheAceOfHearts>oh, I've looked at it a bit, actually
05:02:42  <Tonisius>Thanks for pointing me in the direction of compose, even though I glanced over it.
05:02:47  <LeXXik>hey guys
05:02:54  <LeXXik>noticed you were talking about routers
05:03:04  <LeXXik>here's mine, if it helps
05:03:05  <LeXXik>http://pastebin.com/QLry0sPm
05:03:43  <TheAceOfHearts>interesting
05:07:32  <Tonisius>sweet, got the compose working for me, and removed quite a bit of lines
05:07:39  <TheAceOfHearts>cool :p
05:10:10  <Tonisius>and that routes, seems interesting, but where is the routes.* defined, I feel a bit blind.
05:12:54  * eh_effquit (Ping timeout: 265 seconds)
05:13:00  <LeXXik>there is a simple index.js in the /api folder with module.exports = { users: require('./users'), profiles: require(... }
05:13:25  <Tonisius>ah, I get it. nifty.
05:13:45  <LeXXik>and each api module then has own folder within /api folder, e.g. /api/users , /api/profiles, etc
05:16:03  <Tonisius>that's pretty much what I was doing, except I did a koa-resource-router for each api module
05:16:27  <Tonisius>but you're defining the routes again in the secure.* again, why?
05:16:42  <Tonisius>that seems like double work, and you could just define the full resource in your api routes
05:17:09  <Tonisius>similar to how controllers in an MVC designed app work.
05:17:41  <LeXXik>I'm using two different instances of Router, one for public and one for private
05:18:15  <LeXXik>I did it ages ago, so can't really remember the reasoning, but I think I followed the suggestion of the Router creator
05:20:20  <LeXXik>koa-router that is
05:20:41  * LeXXikis gone for lunch :P
05:22:25  <Tonisius>I was hoping I could tether specific resources to a koa-router, but I guess that's not how it works, I'm assuming that's what the mount is for.
05:28:51  * kazuponjoined
05:34:03  * kazupon_joined
05:36:18  <Tonisius>now it looks sexy. Now to work out how to manage this filewise, and break it down into directories
05:36:57  * kazuponquit (Ping timeout: 245 seconds)
05:42:01  <Tonisius>now to read up on sequalize
05:42:23  <TheAceOfHearts>lol
05:42:25  <TheAceOfHearts>sequelize is nice
05:42:47  * eh_effjoined
05:51:23  * joshonthewebjoined
05:53:35  * eh_effquit (Quit: WeeChat 1.0.1)
06:00:37  <Tonisius>TheAceOfHearts: is there a reverse sync() function that builds out models for you, similar to how the dbix perl module prepares objects?
06:01:06  <Tonisius>so that you can build full models from a database connection.
06:04:48  * joshonthewebquit (Quit: Computer has gone to sleep.)
06:09:40  <Tonisius>TheAceOfHearts: or, is there a yield, instead of a complete() method, so that I can wait for results from a query, say... a fetch/fetchAll? I hate leaving the current context.
06:11:53  <TheAceOfHearts>you can yield on a fetch
06:12:06  <TheAceOfHearts>but nope, there's no way to automatically build your migrations
06:12:10  <TheAceOfHearts>idk, just set it up once
06:12:11  <Tonisius>same as bookshelf then.
06:13:11  <Tonisius>so, migrations is the term to deploy to the database, I meant reverse, like build models based on the database connection.
06:13:41  <TheAceOfHearts>it's just like Rails and ActiveRecord
06:28:07  * stagasquit (Ping timeout: 244 seconds)
06:42:30  <Tonisius>oh... now I found an issue with koa-resource-router, it fails to singularize the word status... it thinks that singular of status is statu...
06:42:35  <Tonisius> <-- GET /api/status/3
06:42:35  <Tonisius>[ statu: '3' ]
06:43:44  <TheAceOfHearts>probably not as robust as Rails' router :P
06:43:46  <TheAceOfHearts>do a PR
06:43:47  <TheAceOfHearts>?
06:46:05  <Tonisius>yeah, but lingo is expired...
06:46:16  <TheAceOfHearts>Hmm?
06:46:16  <Tonisius>I mean abandoned.
06:46:22  <TheAceOfHearts>you could take it over :P
06:46:34  <Tonisius>https://www.npmjs.org/package/lingo
06:46:44  <Tonisius>how does someone take over? and there is a replacement available for it
06:46:59  <TheAceOfHearts>probably message tj
06:47:11  <TheAceOfHearts>he's no longer supporting his old modules
06:49:31  <Tonisius>slang is the replacement to lingo.
06:49:33  <Tonisius>tj?
06:49:40  <TheAceOfHearts>I see
06:49:50  <TheAceOfHearts>TJ is the guy that published the module on npm
06:54:27  <Tonisius>lingo has a simple replacement, with slang. instead of lingo.en.singularize() it would be slang['en'].singularize()... oh wells.
06:54:40  <TheAceOfHearts>uhh
06:54:44  <TheAceOfHearts>you can do slang.en.singularize()
06:57:04  <Tonisius>maybe I have both mixed up.
06:57:32  <Tonisius>but yeah, lingo is deprecated, but koa-resource-router is not deprecated, even if the libraries it uses are older.
06:58:46  <Tonisius>maybe a PR for amingoia's to replace lingo with slang? is that proper?
06:58:51  <TheAceOfHearts>sure
07:13:34  * kazupon_quit (Remote host closed the connection)
07:17:43  * kazuponjoined
07:22:39  <Tonisius>TheAceOfHearts: is TJ famous?
07:22:48  <Tonisius>he seems to bleed nodejs...
07:22:57  <TheAceOfHearts>he's kind of a big deal lol
07:23:02  <TheAceOfHearts>but he left node
07:23:05  <TheAceOfHearts>he's only working on koa now
07:23:30  <Tonisius>he has almost 600 packages he wrote listed on npm. Videos on vimeo...
07:26:37  <Tonisius>I need more cereal
07:26:46  <TheAceOfHearts>haha
07:26:47  <TheAceOfHearts>he's cool
07:27:25  <Tonisius>I'll just have to take your word for it, it's a Node thing I guess.
07:27:29  <Tonisius>I'm not in the know yet.
07:28:16  <TheAceOfHearts>well, I don't know him
07:28:20  <TheAceOfHearts>but I use a lot of his code haha
07:30:49  <Tonisius>we all do it seems
07:36:19  <Tonisius>I can't figure out why the word status comes out as statu, even in slang.
07:36:42  <Tonisius>even though the word is listed as singular/plural: https://github.com/tj/lingo/blob/master/lib/languages/en.js
07:37:58  <TheAceOfHearts>dunno
07:46:54  * mkoquit (Quit: Bye.)
07:49:17  <Tonisius>my first PR got merged <3 This feels special
07:54:48  <TheAceOfHearts>great :p
08:01:12  * kazuponquit (Remote host closed the connection)
08:01:40  * kazuponjoined
08:08:08  * kazuponquit (Remote host closed the connection)
08:09:21  * kazuponjoined
08:13:44  * kazuponquit (Ping timeout: 258 seconds)
09:22:27  * TheAceOfHeartsquit (Quit: Leaving.)
10:30:34  * LeXXikquit (Quit: Leaving)
11:25:25  * shesekquit (Ping timeout: 244 seconds)
12:20:38  * stagasjoined
12:42:22  * mjamjoined
13:10:02  * mjamquit (Quit: My Mac has gone to sleep. ZZZzzz…)
13:23:49  * HairAndBeardGuy_joined
13:27:29  * HairAndBeardGuyquit (Ping timeout: 264 seconds)
13:35:48  * HairAndBeardGuyjoined
13:38:09  * HairAndBeardGuy_quit (Ping timeout: 245 seconds)
13:47:42  * mjamjoined
13:59:47  * mhernandez1joined
14:02:39  * shesekjoined
14:15:23  * LeXXikjoined
14:16:44  * kazuponjoined
14:48:33  * bmacjoined
14:51:13  * HairAndBeardGuy_joined
14:51:15  * boredzjoined
14:52:08  * HairAndBeardGuy_quit (Read error: Connection reset by peer)
14:52:35  * HairAndBeardGuy_joined
14:54:24  * HairAndBeardGuyquit (Ping timeout: 245 seconds)
14:57:52  * HairAndBeardGuy_quit (Ping timeout: 255 seconds)
15:33:56  * mboelterjoined
15:49:01  * LeXXikquit (Quit: Leaving)
16:31:27  * kazuponquit (Remote host closed the connection)
16:34:05  * kazuponjoined
16:42:28  * ramitosquit (Remote host closed the connection)
16:43:07  * ramitosjoined
16:51:10  * basicdaysquit (Quit: I'm out)
16:53:09  * shesekquit (Ping timeout: 255 seconds)
17:07:25  * TheAceOfHeartsjoined
17:09:06  * TheAceOfHearts1joined
17:09:35  * TheAceOfHeartsquit (Read error: Connection reset by peer)
17:47:06  * kazuponquit (Remote host closed the connection)
17:48:07  * kazuponjoined
17:53:17  * kazuponquit (Ping timeout: 264 seconds)
17:58:21  * mjamquit (Quit: My Mac has gone to sleep. ZZZzzz…)
18:48:51  * kazuponjoined
18:49:37  * eh_effjoined
18:53:22  * kazuponquit (Ping timeout: 244 seconds)
19:48:53  * kazuponjoined
19:55:00  * kazuponquit (Ping timeout: 250 seconds)
20:07:10  * eh_effquit (Quit: WeeChat 1.0.1)
20:15:17  * basicdaysjoined
20:25:18  * eh_effjoined
20:33:11  * boredzquit (Ping timeout: 258 seconds)
20:35:07  * ryexleyjoined
21:39:23  * kazuponjoined
21:43:51  * kazuponquit (Ping timeout: 255 seconds)
22:06:15  * eh_effquit (Ping timeout: 272 seconds)
22:08:08  * mhernandez1quit (Remote host closed the connection)
22:22:31  * ryexleyquit (Quit: Textual IRC Client: www.textualapp.com)
22:30:01  * eh_effjoined
22:34:11  * mkojoined
22:48:11  * mkoquit (Remote host closed the connection)
22:55:10  * kazuponjoined
22:57:19  * mkojoined
23:00:33  * kazuponquit (Ping timeout: 260 seconds)
23:09:01  * TheAceOfHearts1quit (Quit: Leaving.)
23:09:19  * TheAceOfHeartsjoined
23:16:43  * mboelterquit (Remote host closed the connection)
23:21:52  * bmacquit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
23:22:14  * kazuponjoined
23:26:28  * kazuponquit (Ping timeout: 250 seconds)
23:32:11  * sojjoined
23:41:27  * TheAceOfHeartsquit (Quit: Leaving.)