Testing if your site works well on your local machine is always burdensome.
I found a tool that makes it really simple, mkcert:
➜ localhost-h...
For further actions, you may consider blocking this person and/or reporting abuse
OK, but, what version of
cat
is that? Never seen anything like it. And how do you turn the extra stuff off?Hi John,
it's bat aliased to
cat
:-)what do you mean?
I just meant if you wanted the standard behaviour of
cat
, because if you didcat file.txt > otherfile.txt
that formatting would cause you to have a bad time, OK?Ah ok!
No, it doesn't happen:
I'm curious to how it knows to change the output depending where the output is directed to. Like aren't both
stdout
from the point of view ofbat
?You can detect if the output is being redirected with POSIX functions isatty(3) and fstat(2)
Hope it works well with Rails. I have had so much trouble trying to a local HTTPS server running with Rails :( I almost always end up using ngrok.
Works fine with rails. After creating / installing your certificate as described in the article, start your rails server via rails s -b 'ssl://localhost:3000?key=./localhost-key.pem&cert=./localhost.pem'
Let me know, I haven't tried :)
I'm not that familiar with Docker so I don't know. The tool is a standard Go binary and I guess if you open the port of the web app serving you might accomplish something.
You need to root in your container to install it though, just downgrade your permissions after that.
Why? You can create a test domain or subdomain and use letsencrypt.
You can also use ngrok, mkcert seems easier than all the options I can think of, ngrok included
Yes, but letsencrypt will work even if someone else is accessing your dev server and the effort isn't any bigger, so why bother creating local certificates if you can create a valid one?
Can you write an article about it? It would be useful for everyone. Thank you!
I love the mkcert setup you describe. That said, letsencrypt is also awesome!
I've written an article about it: dev.to/alexeydc/modern-https-confi...
Hey, that's really useful, thanks for sharing!
Do you know if this works with a XAMPP or LAMPP localhost server? I would like to use this for my wordpress projecs.
I believe so, it's independent from the technology of the server. It just needs to support TLS.
I'm not familiar with either XAMPP or LAMPP but judging from a search engine query you need a tutorial on how to use a certificate with Apache. This seems a valid one (from Step 2): digitalocean.com/community/tutoria...
Thanks, in the past I tried some tutorials and other techniques but I found difficult to install them in the browser "trust stores", this one seems easy, I will give it a try!
Can I use this with Next.js?
I'm not familiar with Next.js but it's language agnostic. As long as you can point a web server to the certificate you should be able to use it!
I figured it out. I used a custom server and pointed it to the certificate. Thanks!
Thanks
Thanks
Thanks
Thanks
Thanks
Thanks 🙏
This is exactly what I needed....trying it right now...thanks for sharing!
Cool