Lesson 13March 20, 20265 min read

Node.js Example - Remote Development

Deploying an environment is the first step, but as a developer you spend most of your time writing code and iterating. Waiting for a full build and deploy cycle on every change would kill your productivity. That is where Bunnyshell's remote development feature comes in — it gives you the live coding experience of local development, running against a real cloud environment. Watch the video above to see the full setup and workflow in action.

What Is Remote Development?

Remote development is a workflow where you edit code locally in your IDE but the application runs in the cloud. Bunnyshell syncs your local file changes to the remote container in real time, and the application process detects the changes and reloads automatically — just like hot reload on your local machine, but the code is running in a full cloud environment with real databases, real services, and production-like networking.

The key distinction from a regular deployment is that remote development bypasses the build-deploy cycle. You do not rebuild a Docker image or redeploy a component every time you change a line of code. Instead, the file sync replaces the changed files directly inside the running container, and Node.js tools like nodemon, ts-node-dev, or Vite's dev server detect the changes and restart or hot-reload the application process. The feedback loop is measured in seconds, not minutes.

Setting Up Remote Dev in Bunnyshell

Setting up remote development for a Node.js component takes just a few steps. First, ensure your environment is deployed and running in Bunnyshell. Then, use the Bunnyshell CLI to start a remote development session for the specific component you want to work on.

The command is straightforward: bns remote-development up --component <component-name>. When you run this, Bunnyshell does several things behind the scenes. It swaps the running container's entrypoint to a development-friendly command (for example, switching from node server.js to nodemon server.js). It sets up a bidirectional file sync between your local project directory and the container's working directory. And it configures port forwarding so you can access the application on a local port if needed.

The file sync uses an efficient diff-based algorithm that only transfers changed bytes, keeping the sync fast even on larger codebases. When you save a file in your editor, the change appears in the remote container within a second or two. If your Node.js application is set up with a file watcher like nodemon, it picks up the change and restarts the process automatically. For frontend code with hot module replacement, changes reflect in the browser almost instantly.

Benefits Over Local Development

Running everything locally works fine for simple applications. But as your stack grows — a frontend, a backend API, a database, a cache layer, maybe a message queue — local development becomes painful. Your laptop fans spin up, Docker Desktop consumes gigabytes of RAM, and you spend more time debugging environment differences than writing features.

Remote development solves these problems. The cloud environment runs the full stack with adequate resources, so your laptop stays responsive. The environment is identical for every team member — no more "works on my machine" because everyone is running against the same infrastructure. Real services like PostgreSQL, Redis, or Elasticsearch are running in the environment, so you are coding against actual dependencies instead of mocks or SQLite substitutes.

The workflow also makes onboarding dramatically faster. A new developer clones the repository, installs the Bunnyshell CLI, runs a single command, and has a full development environment connected to their local editor. No need to install database servers, configure networking, or follow a twenty-step setup guide.

When you are done coding, end the remote development session with bns remote-development down. Bunnyshell restores the component to its original deployed state. Your changes are in your local Git repository, ready to commit and push. The environment continues running with the last deployed version, unaffected by your development session.

Ship faster starting today.

14-day full-feature trial. No credit card required. Pay-as-you-go from $0.007/min per environment.

Frequently Asked Questions

What is remote development in Bunnyshell?

Remote development lets you write code in your local IDE while the application runs in a Bunnyshell cloud environment. Your local file changes are synced to the remote container in real time, and the application hot-reloads with your changes. You get the speed of local editing with the reliability of a production-like cloud environment.

Do I need to rebuild the container every time I change code during remote development?

No. Remote development bypasses the build-deploy cycle entirely. File changes are synced directly into the running container, and the application process picks them up through hot reload or file watching. This gives you sub-second feedback loops, similar to local development but running in the cloud.

What are the benefits of remote development over running everything locally?

Remote development gives you a consistent environment that matches staging and production, real databases and services instead of mocks, no local resource consumption (your laptop stays cool), and eliminates works-on-my-machine issues. It is especially valuable for complex stacks with multiple services, databases, and message queues that are painful to run locally.