Disclaimer :- GitHub Codespaces also have some limitations. Checkout there docs.
GitHub Codespaces
- Create new Codespace of your GitHub Repo and Install Homebrew there.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- For Example you are using NextJS. Then Build and Start your Server. i.e.
http://localhost:3000
.
Use Tunnelling
Now, Open your URL of GitHub Codespaces where your server is running now we need to forward the port or create a tunnel to expose our localhost to the internet.
You can use other services like ngrok, I’m using Cloudflare Tunnel.
cloudflare-tunnel :- https://developers.cloudflare.com/pages/how-to/preview-with-cloudflare-tunnel
# Install Cloudflare
brew install cloudflared # Start Tunnel
cloudflared tunnel --url http://localhost:3000
You will get a custom domain by cloudflare temporarily but you can also add your own custom domain name for free.
See This Video.
Discover more from Coursity
Subscribe to get the latest posts sent to your email.