00:00:15  <mjora7>I used the `openssl` command-line utility to generate a private key and security certificate request. When I go onto LetsEncrypt's site, it looks extremely complicated to get a security certificate. Isn't there a way to upload the request file and get a certificate that I can use simply? I'm just doing this for testing purposes, it's not going onto a production site (I'd use the hosts built in certificate mechanisms for that).
00:00:25  <jaawerth>services like these are pretty useful for testing stuff. many of them (including DO) even offer an API so you can automatically spin up a bunch of servers to do whatever and then shut them down
00:00:26  <joepie91>mjora7: you're not supposed to do this manually
00:00:27  * orbyt_quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:00:29  * savantgardejoined
00:00:41  * lowercasemanquit (Quit: Textual IRC Client: www.textualapp.com)
00:00:45  <nomoney4u>sounds great guys. Time to go home :)
00:00:46  * huseyinkozanquit (Ping timeout: 246 seconds)
00:00:49  <joepie91>mjora7: Let's Encrypt is designed to be used in an automated manner - either using their own automation thing (Certbot) or a third-party implementation (like Caddy has)
00:00:49  <nomoney4u>Happy Friday!!
00:00:55  <jaawerth>you could spin up 30 instances and use them for a day, and it would cost you $5
00:01:09  <nomoney4u>will look at DO
00:01:13  <nomoney4u>seems very nice
00:01:24  * nomoney4uquit (Remote host closed the connection)
00:01:24  <jaawerth>it's not necessarily the best - but it's well-known and it's been good for my needs
00:01:31  * gothicsouthquit (Quit: My iMac has gone to sleep. ZZZzzz…)
00:01:53  <mjora7>joepie91: Ok. What should I do? Just not use https for my local dev, or use one of their automated tools?
00:02:00  <jaawerth>joepie91: good to know re: possible vultr gotchas
00:02:15  <joepie91>mjora7: for local dev, you don't need https
00:02:24  <joepie91>unless you have something that requires it
00:02:37  <joepie91>mjora7: plus you can't get a signed certificate for a non-public hostname either way
00:02:47  <mjora7>joepie91, What if I'm communicating with a database in the cloud?
00:03:20  <joepie91>mjora7: do you mean "communicating with a database on a remote server"?
00:03:30  <mjora7>joepie91, Yes
00:03:32  <jaawerth>you can always use a self-signed cert and add it to your local cert store if it's only specific things that need to talk to each other
00:03:45  <joepie91>mjora7: whether your application supports TLS does not affect that
00:03:52  <joepie91>mjora7: the DB connection is an outbound connection
00:04:07  * melvin_quit (Ping timeout: 240 seconds)
00:04:17  <joepie91>mjora7: that having been said, be very careful with remote databases - often there are a lot of gotchas in setting them up securely for network access
00:04:42  * huseyinkozanjoined
00:04:56  <mjora7>Ok
00:05:15  <mjora7>So as far as I understand it right now, I don't really need https since I'm purely local.
00:05:35  <mjora7>When I throw it up onto Heroku, HTTPS just magically works. So that's cool.
00:05:42  <mjora7>I'd like to understand it more indepth though.
00:06:41  * savantgardequit (Ping timeout: 268 seconds)
00:09:06  * zwaragquit (Remote host closed the connection)
00:09:28  * nitricquit (Ping timeout: 240 seconds)
00:11:20  * lowercasemanjoined
00:13:11  * R34p3Rquit (Ping timeout: 255 seconds)
00:13:36  * kingarmadillojoined
00:15:29  * R34p3Rjoined
00:15:56  * fbenoitjoined
00:20:39  * re1quit (Read error: Connection reset by peer)
00:20:52  * fbenoitquit (Ping timeout: 268 seconds)
00:21:04  * R34p3Rquit (Ping timeout: 246 seconds)
00:21:40  * karmahac_quit (Remote host closed the connection)
00:22:17  <Industrial>Hi.
00:22:37  <Industrial>Say I want to res.statusCode = 200;
00:22:50  <Industrial>Can I do that depending on wether the headers have been sent or not?
00:23:20  * R34p3Rjoined
00:23:32  <Industrial>This is for a middleware that should work on different kinds of requests. Some of them already set the headers.
00:25:08  * mylordjoined
00:25:13  * tristanpquit (Remote host closed the connection)
00:25:34  <Industrial>got it. res.headerSent
00:25:48  * Foxtrotchanged nick to foxtrot
00:26:06  * gothicsouthjoined
00:26:30  * kbckquit (Read error: Connection reset by peer)
00:26:42  <joepie91>Industrial: is this error-handling middleware?
00:28:04  * safejoined
00:28:30  <Industrial>joepie91: this is the example of next.js on how to integrate it with koa.js and my attempt to integrate it with my koa middleware stack.
00:28:31  <Industrial>https://gist.github.com/Industrial/d8aac22753252cc706b2d91efc54997f
00:28:49  <joepie91>oh, Koa
00:28:56  <joepie91>no idea then :P
00:29:15  <jaawerth>I'd assume koa treats it the same way express does
00:29:15  * joyeejoined
00:29:20  <jaawerth>s/assume/guess/
00:29:32  <Industrial>I can't get the response time and helmet middlewares to work if I do this, and the middleware adding the response code from the example looks really weird to me, but it won't work without.
00:29:45  * ahmed_elgabriquit (Quit: WeeChat 1.8)
00:29:47  <jaawerth>given it's basically express + co and has the same author
00:30:07  * m31271nquit (Ping timeout: 268 seconds)
00:30:26  * ColeHubquit (Quit: Bye.)
00:30:27  * perrier-jouetquit (Ping timeout: 240 seconds)
00:30:47  <Industrial>I just want a static file server and all the other routes handled by next.js, hence the koa-router
00:31:30  * karmahackerjoined
00:31:31  <Industrial>I'm not sure why the next.js route handler isn't just returning the correct status code for the request by itself. Seems to me the decision should be made there.
00:33:35  * joyeequit (Ping timeout: 240 seconds)
00:33:41  * modlinquit (Ping timeout: 246 seconds)
00:34:51  <Industrial>https://github.com/zeit/next.js/blob/v3-beta/examples/custom-server-express/server.js#L21
00:35:16  <Industrial>this is how it's integrated into express
00:36:03  <jaawerth>doesn't next.js support static file serving?
00:37:57  * duderonomyjoined
00:39:42  * bobby_barkerjoined
00:40:22  <Industrial>Got it there https://gist.github.com/Industrial/d8aac22753252cc706b2d91efc54997f#file-1-my-server-js-L76
00:40:30  * MistahKurtzjoined
00:43:51  * modlinjoined
00:44:18  * ktquit (Changing host)
00:44:19  * ktjoined
00:44:58  * pstef__quit (Quit: Connection closed for inactivity)
00:45:04  * rxmthjoined
00:45:12  * nodweberquit (Remote host closed the connection)
00:46:31  * perrier-jouetjoined
00:46:50  * lowercasemanquit (Read error: Connection reset by peer)
00:47:17  * lowercasemanjoined
00:47:25  * gothicsouthquit (Quit: My iMac has gone to sleep. ZZZzzz…)
00:48:20  <jaawerth>Industrial: cool, but I just checked and next.js will totally serve static files from a "static" dir
00:48:41  <Industrial>jaawerth: hm k
00:50:09  * eshloxquit (Quit: Connection closed for inactivity)
00:51:53  * munch_quit (Quit: Leaving)
00:55:08  * m31271njoined
00:55:20  * mylordquit (Quit: mylord)
00:55:28  * MachinShinquit (Ping timeout: 240 seconds)
00:56:09  * TikityTikjoined
00:57:43  * Bishop_B_joined
00:58:14  <Industrial>jaawerth: https://gist.github.com/Industrial/c6a60084701440cf34876bbfc1f6ecca
00:58:26  <Industrial>Everything works except for that one request :-)
00:58:41  <Industrial>but it's the one that polls for updates from next.js
00:59:55  * glijoined
01:03:00  * malmalmalquit (Ping timeout: 260 seconds)
01:04:49  <jaawerth>that makes sense - if the headers have been sent I don't think you can modify that stuff
01:05:08  <jaawerth>that's how it works with express, and I haven't used koa in a couple years but I'm pretty sure it would work the same way based on all its other similarities to express
01:05:25  <jaawerth>plus I think you can't in general because http and how node handles it
01:05:33  <jaawerth>but I could be wrong about that
01:06:50  <jaawerth>but yeah, it MUST work that way because the static goes out *with* the headers
01:07:02  * superloujoined
01:07:34  * Miaquit (Read error: Connection reset by peer)
01:10:53  * frjoined
01:12:05  <doodadjs>The HTTP status is sent just before headers. If headers are sent, it's too late.
01:13:46  * fr_quit (Ping timeout: 240 seconds)
01:14:49  * modlinquit (Quit: Leaving)
01:16:00  * gothicsouthjoined
01:16:06  * MachinShinjoined
01:16:54  * mjora7quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
01:17:59  * plutoniixquit (Ping timeout: 240 seconds)
01:18:07  * cr34tonjoined
01:20:00  * ed209quit (Remote host closed the connection)
01:20:06  * ed209joined
01:20:06  * anuxivmpart
01:22:28  * cr34tonquit (Ping timeout: 246 seconds)
01:23:46  * SomeKittensjoined
01:25:55  <jaawerth>before (not with) would make sense, yes (derp)
01:28:11  * ividyonquit (Quit: Leaving)
01:31:04  * savantgardejoined
01:34:49  * Bishop_B_quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:36:26  * savantgardequit (Ping timeout: 255 seconds)
01:37:19  * sibajoined
01:37:45  * gucci_meowjoined
01:45:00  * HoierMquit (Ping timeout: 260 seconds)
01:47:49  * MachinShinquit (Ping timeout: 268 seconds)
01:49:58  * chippingquit (Ping timeout: 246 seconds)
01:49:59  * texinwien_quit (Ping timeout: 246 seconds)
01:50:45  * chippingjoined
01:52:24  * pilnequit (Quit: Quitting!)
01:52:37  * goodenoughquit (Remote host closed the connection)
01:52:58  * b0neskulljoined
01:53:31  * diamondsjoined
01:54:05  * boneskullquit (Ping timeout: 240 seconds)
01:54:08  * rxmthquit (Ping timeout: 240 seconds)
02:00:47  * computer2000joined
02:01:53  * nomoney4ujoined
02:03:13  * victorqueirozjoined
02:03:32  * Defcronykequit (Read error: Connection reset by peer)
02:03:58  * Defcronykejoined
02:05:46  * tymczenkoquit (Remote host closed the connection)
02:05:49  * computer2000quit (Ping timeout: 245 seconds)
02:06:14  * nomoney4uquit (Ping timeout: 245 seconds)
02:07:09  * tristanpjoined
02:07:29  * SirPolequit (Ping timeout: 255 seconds)
02:09:01  * superlouquit (Ping timeout: 246 seconds)
02:13:29  * HoierMjoined
02:13:58  * HoierMquit (Max SendQ exceeded)
02:14:33  * HoierMjoined
02:14:59  * HoierMquit (Max SendQ exceeded)
02:15:28  * HoierMjoined
02:15:34  * Fleeboxjoined
02:15:51  * HoierMquit (Max SendQ exceeded)
02:16:16  * Fleebox_quit (Ping timeout: 260 seconds)
02:16:20  * einnjoquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
02:16:30  * fbenoitjoined