localhost:8080 → https://my-app.dev | Create secure URLs for the local development environment.

pulkit kathuria
web-developer
Published in
3 min readAug 18, 2019

--

Setup secure https URLs for development on local machine guide. Change port 8080 to 80 with https and local dev domain. Easy to manage and one step setup using Valet.

This tip is helpful for any Nodejs, Go apps or HTTP server apps ― that run on ports like 8080, 3000, 1323, etc on your local environment.

Although Valet is mostly used in Laravel apps, we can tweak it very quickly to set it up for any app like Nodejs, Go HTTP server to create our own https URL with dot dev.

This is helpful to manage your development domains, and use API like facebook, twitter, and many others ― where https domains are mandatory.

Https is also a default mandatory if you are going to be developing AMP Pages on local ― and for the development of PWA’s and calling secure APIs.

Concept

Most HTTP servers start a server on the local machine with ports like 8080, 1323, etc. While Valet helps us generating SSL certificates and create Nginx config for each domain.

We can simply set up Nginx's reverse proxy and have the development site serve on the secure https URL.

Pre-requisites

  1. Install Valet

Setup

① Initiate Valet

cd my-app/
valet link my-app // you can choose any name here.
valet…

--

--

pulkit kathuria
web-developer

If it is on the internet already, I won’t write about it. Just sharing novel items that I discover during work and find worth sharing.