This repo is made for this article in which I explain how to setup local development environment that runs over HTTPS using Caddy as reverse-proxy server.
This project is demostrating running two apps one as frontend and the other as backend behind Caddy server which reverse proxy requests to them, locally over HTTPS.
It is a simple Todo app with one page, in which everything is opened for guest user, but once guest add/delete/etc... any task, a 401 will be raisd by the backend. Then authenticate
the guest will make him able to perform operations on tasks.
Backend app is made by node.js
, and frontend one by vue.js
.
- Ubuntu 18.04
- mkcert
- caddy server (v2_beta13)
- node.js (>12.14.0)
- vue.js (>2.6.10)
- Clone project
git clone https://github.com/devahmedshendy/dev-over-https-traditional-setup.git
- Generate Local Trusted Certificate for *.foo.bar domain
./init.sh
- Install backend dependencies and run it
- Open new terminal.
- Switch to dev-over-https-traditional-setup/backend.
npm install
npm run dev
- Install frontend dependencies and run it
- Open new terminal.
- Switch to dev-over-https-traditional-setup/frontend.
npm install
npm run serve
- Start Caddy server
- Open new terminal.
- Switch to dev-over-https-traditional-setup/caddy.
caddy run
Now project is ready. You can access it from browser.
Also check following video for recorded demo of this project demonstrating a simple useful use of cookies over HTTPS: