00:41:32  * eh_effquit (Quit: WeeChat 1.1)
01:09:24  * Foxandxssquit (Quit: Textual IRC Client: www.textualapp.com)
01:43:16  * mhernandez1joined
02:14:18  * TheAceOfHeartsquit (Quit: Leaving.)
02:40:54  * TheAceOfHeartsjoined
03:08:32  * jongleberryquit (Remote host closed the connection)
03:08:35  * hmsimhajoined
03:08:58  * jongleberryjoined
03:11:13  <hmsimha>Hi, I'm working with a project that uses Koa with Mongoose, and I'm wondering if the models that have been created are fatter than they should be. For example, we use sendgrid's API for sending email, and upon a user signing up, the code to send them their email confirmation will be in a model method.. does this sound right, or should this kind of thing either have its own middleware or be done from the router?
03:13:23  * jongleberryquit (Ping timeout: 252 seconds)
03:24:29  * ryexleyjoined
03:26:14  <TheAceOfHearts>that really depends on you
03:26:48  <TheAceOfHearts>personally, I just have a helper object for other libs and stuff
03:26:53  <TheAceOfHearts>for example, I do file uploads to s3 with a helper
03:27:20  <TheAceOfHearts>and I have models that depend on that for some types
03:27:32  <TheAceOfHearts>but it's only used in my controllers
03:32:05  * mhernandez1quit (Remote host closed the connection)
03:37:25  * ryexleyquit (Quit: Textual IRC Client: www.textualapp.com)
04:07:38  <hmsimha>ok, thanks theAceOfHearts. By controllers, are you referring to routes?
04:08:18  <TheAceOfHearts>yeah, I call the controller the place where the main action for the route is happening
04:09:14  <hmsimha>ok thanks. I am new to Koa (as well as node) and my idea of MVC comes from Rails so this is all still falling into place for me
04:10:34  <hmsimha>I think the original developer didn't really put a clear distinction between controllers and models into place, so a lot of what I think would be considered the main action ends up being done by model methods
04:11:28  <TheAceOfHearts>koa isn't opinionated at all, unlike Rails
04:11:35  <TheAceOfHearts>it's not a bad thing
04:11:43  <TheAceOfHearts>I do Rails at my job :p
04:12:53  <hmsimha>Yeah I did Rails for an internship, but I was actually a little bit overwhelmed by all the magic. I like that Koa is a lot more transparent, but from what I see now, that may also mean the developers are responsible for making sure things are very clearly organized.
04:13:25  <TheAceOfHearts>that's not necessarily a bad thing :D
04:16:57  <hmsimha>no I agree
04:18:55  <TheAceOfHearts>although, it took me a while to figure out what patterns I'm most comfortable with
04:38:19  <hmsimha>yes, I think this more fuzzy distinction is causing some confusion in the team currently, because the person who set everything up had routes delegate to model methods for a lot of things, and in some cases different routes delegate to the same model method that then handles them differently, causing the execution to be very spaghetti-like
04:38:25  <hmsimha>so it's a bit hard to reason with
05:10:25  <TheAceOfHearts>that's unfortunate
05:29:54  * jongleberryjoined
06:23:02  * jongleberryquit
06:32:01  * jongleberryjoined
06:59:16  * TheAceOfHeartsquit (Quit: Leaving.)
07:38:51  * hmsimhaquit (Ping timeout: 252 seconds)
08:27:54  * hmsimhajoined
09:13:05  * basicdaysquit (Ping timeout: 244 seconds)
11:33:57  * mhernandez1joined
11:48:14  * Foxandxssjoined
12:04:19  * shesekquit (Ping timeout: 252 seconds)
12:19:33  * EvanFreemanquit (Remote host closed the connection)
12:35:09  * shesekjoined
12:43:28  * mhernandez1quit (Remote host closed the connection)
14:00:20  * EvanFreemanjoined
14:05:00  * EvanFreemanquit (Ping timeout: 244 seconds)
14:16:13  * mhernandez1joined
15:14:02  * basicdaysjoined
15:22:56  * EvanFreemanjoined
15:28:28  * shesekquit (Ping timeout: 255 seconds)
15:45:14  * shesekjoined
16:03:53  * basicdaysquit (Quit: I'm out)
16:07:26  * basicdaysjoined
16:15:42  * shesekquit (Ping timeout: 246 seconds)
16:46:10  * UniOnjoined
17:39:05  * corbanbjoined
17:39:07  * jongleberryquit (Remote host closed the connection)
18:02:17  * corbanbquit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
18:06:58  * corbanbjoined
18:08:03  * jongleberryjoined
18:28:57  * hmsimhaquit (Ping timeout: 252 seconds)
18:41:49  * hmsimhajoined
19:21:38  * corbanbquit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
19:31:27  * corbanbjoined
19:38:27  <Foxandxss>I have a question for this line of code: https://github.com/koajs/koa/blob/master/lib/response.js#L419
19:38:44  <Foxandxss>that setHeader method, for the tests is defined on /test/context.js
19:38:51  <Foxandxss>but where is on production?
19:42:00  * TheAceOfHeartsjoined
19:48:28  * tunnckoCorequit (Ping timeout: 264 seconds)
19:48:50  * tunnckoCorejoined
19:51:36  * basicdaysquit (Quit: I'm out)
19:55:51  * hmsimhaquit (Ping timeout: 252 seconds)
19:56:37  * ajk27quit (Ping timeout: 264 seconds)
20:16:44  * basicdaysjoined
20:19:38  * ajk27joined
21:01:30  <jongleberry>what do you mean? the code doesn't differentiate between environments
21:28:18  * basicdaysquit (Quit: I'm out)
21:40:42  * EvanFreemanquit (Ping timeout: 244 seconds)
21:45:23  * EvanFreemanjoined
21:45:44  * eh_effjoined
21:47:36  * basicdaysjoined
22:12:02  * mhernandez1quit (Remote host closed the connection)
22:14:49  <Foxandxss>I fifured it out, setHeader is on the original res which is what koa receives
22:15:19  <Foxandxss>figured*
22:19:09  * EvanFreemanquit (Remote host closed the connection)
22:19:51  * EvanFreemanjoined
22:20:11  * EvanFreemanquit (Remote host closed the connection)
22:30:21  * mhernandez1joined
22:32:35  * mhernandez1quit (Remote host closed the connection)
22:48:27  * UniOnquit (Remote host closed the connection)
22:50:44  * EvanFreemanjoined
22:57:10  * EvanFreemanquit (Ping timeout: 244 seconds)
23:49:54  * hmsimhajoined
23:58:37  * mhernandez1joined