Making your
Vue.js app accessible on the internet doesn’t have to be complicated. If you’re new to Vue.js, it’s a progressive
JavaScript framework that makes building interactive user interfaces and single-page applications a breeze. Whether you’re working on a personal project, sharing progress with teammates, or testing your app on real devices, getting it online securely can feel like a challenge—especially if setting up servers isn’t your thing.
That’s where Pinggy comes in. With Pinggy, you can host your locally running Vue.js app on the web without any server setup or complicated steps. It’s simple, secure, and works seamlessly, just like popular tools such as
Ngrok.
In this blog, we’ll show you how to use Pinggy to quickly share your Vue.js app with anyone, anywhere. Whether you’re showcasing a project or collaborating with others, Pinggy makes it easy to get your app online in no time.
Vue.js is a progressive JavaScript framework for building user interfaces. Known for its simplicity, versatility, and ease of integration, Vue.js powers everything from simple single-page applications (SPAs) to complex web apps. Whether you’re a beginner or a seasoned developer, Vue.js offers a robust ecosystem to enhance your productivity.
Pinggy is a secure, developer-friendly tunneling solution that allows you to expose your local web apps, APIs, and services to the internet. It simplifies the process of sharing local projects without requiring server setups or complex configurations.
To follow along, you’ll need:
npm install -g @vue/cli
3. A Pinggy account (optional for advanced features).
4. Familiarity with terminal commands.
Start by creating and running a Vue.js app on your local machine.
npx @vue/cli create my-vue-app
cd my-vue-app
npm run serve
Once the server starts, your app will be accessible at http://localhost:8080
by default.
Now, let’s expose your locally hosted Vue.js app using Pinggy.
Run the following command in your terminal:
ssh -p 443 -R 0:localhost:8080 -t qr@a.pinggy.io "u:Host:localhost:8080"
ssh -p 443
: Initiates a secure connection via Pinggy’s server.-R0:localhost:8080
: Maps your Vue.js app (running on port 8080) to a public URL.-t
option and "u:Host:localhost:8080"
modifies the host header to ensure localhost:8080
requests are correctly routed to your local app.qr
the command displays the public URL as a QR code, making it easy to access your app on other devices.qr@a.pinggy.io u:Host:localhost:8080
: Specifies the Pinggy server.After running this command, Pinggy generates a public URL for your Vue.js app, such as:
http://example.pinggy.link
https://example.pinggy.link
Open the provided URL in a browser to view your app live!
If you use a public HTTPS URL provided by Pinggy, you may encounter WebSocket issues. To resolve this, follow these steps:
npm install -g serve
npm run build
serve -s dist
ssh -p 443 -R0:localhost:3000 qr@a.pinggy.io
By serving your built Vue.js app through the serve package and using Pinggy’s HTTPS tunnel, you can avoid WebSocket issues when accessing your app via a public HTTPS URL.
Enhance your tunnel with Pinggy’s advanced features:
Replace the default Pinggy URL with a personalized domain to better align with your branding.
Refer to Pinggy’s Custom Domains documentation for detailed instructions.
Secure your tunnel by adding password authentication, ensuring only authorized users can access your app.
Refer to Pinggy’s Password Protection documentation for detailed instructions.
Hosting your Vue.js app with Pinggy is an effortless way to make your local development projects accessible to anyone. Whether showcasing an app to clients or testing it on various devices, Pinggy provides a secure and efficient solution for developers.