←back to thread

.localhost Domains

(inclouds.space)
301 points todsacerdoti | 1 comments | | HN request time: 0.264s | source
Show context
vlod ◴[] No.43644531[source]
Anyone care to shed why myapp.localhost:3000 (for the webapp I'm developing) is something that's useful for me rather than localhost:3000 ?

EDIT: on linux and don't use launchd, so I'd still the port number

replies(8): >>43644573 #>>43644584 #>>43644588 #>>43644599 #>>43644601 #>>43644606 #>>43644652 #>>43645096 #
jeroenhd ◴[] No.43644573[source]
Using real domain names lets you experience the web as it is in production. Localhost has a bunch of exceptions (i.e. HTTP URLs are treated as secure, CORS acts funny, etc.). Using domain names disables special handling of localhost URLs that'll help you spot problems before they hit production.
replies(2): >>43644611 #>>43646618 #
1. ghoshbishakh ◴[] No.43646618[source]
Trick: edit yuor /etc/hosts file and add a domain name.

Self sign a certificate and add it to your trusted certificate list.

Or - use https://pinggy.io