feat: added new express runtime for selfhosted vps and vms #1450
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add Express Server Runtime
Overview
This PR adds a new Express-based runtime option to run the server build, providing an alternative to the default Cloudflare runtime. This enables developers to run the application in a more traditional Node.js environment for local development and testing.
Key Changes
1. New Express Runtime
bolt-diy-express
runtime in theruntimes
directoryruntime:express_build
andruntime:express
2. Server Entry Point Modifications
app/entry.server.tsx
to usereact-dom/server.browser
instead ofreact-dom/server
Technical Details
bolt-diy-express Runtime
Key technical implementation details:
System Changes
Migration Impact
pnpm runtime:express_build
followed bypnpm runtime:express
Usage Steps
To leverage the new Express runtime:
Build the application with Remix:
Build the Express runtime:
Start the Express server:
Access your application at http://localhost:5173
You can also customize the port by setting the PORT environment variable:
Future Improvements
Documentation Updates