Deploying to Production
Learn how to enable production mode and understand the JopiJS build-less deployment philosophy.
Overview
Transitioning from development to production is a critical step for any application. JopiJS is designed to make this transition as seamless as possible by eliminating the need for complex build pipelines.
In this guide, you will learn:
- How to switch to Production Mode.
- Why JopiJS doesn't require a Build Step.
- How production mode impacts your dependencies and performance.
1. Enabling Production Mode
JopiJS follows the industry-standard convention for Node.js and Bun.js applications. To switch to production, you must set the NODE_ENV environment variable.
Using the environment variable
When starting your server, simply prefix your command:
NODE_ENV=production bun run startChecking the status
When your server starts, JopiJS displays a message in the console if you are in development.
Why use Production Mode?
While JopiJS itself is highly optimized in all modes, many libraries (like React or database drivers) behave differently when NODE_ENV is set to production. They disable expensive debugging checks and verbose logging, which significantly boosts performance.
2. The "No Build" Philosophy
Unlike frameworks like Next.js, JopiJS has no separate "build" command.
In traditional frameworks, you must run a build step to transpile, minify, and optimize your code before deployment. JopiJS eliminates this step entirely.
How is this possible?
- Ultra-Fast Internal Bundler: JopiJS uses an extremely optimized internal bundler that generates production-ready code on the fly with incredible speed.
- Smart JIT Compilation: Assets and components are optimized exactly when they are needed.
- Intelligent Server-Side Caching: JopiJS manages a sophisticated cache to optimize the conversion from React components to HTML.
3. Performance Benchmarks
This architectural choice isn't just about convenience—it's about raw performance.
Faster than the competition: Benchmarks show that JopiJS is 6.5x faster than Next.js.
By removing the build bottleneck and using a superior caching engine, JopiJS reaches the theoretical limits of performance for classic HTTP/1.1 and HTTP/2 stacks.
Summary of Deployment Steps
- Configure your Public URL.
- Set
NODE_ENV=production. - Start your server with
bun run start(ornpm start). - (Optional) Set up a Reverse Proxy for SSL and load balancing.