Welcome to @getcronit/pylon@2.0.0 release (September 2024)!
Pylon v2 introduces the support for different runtimes, a new create command, and an improved development server.
The official supported runtimes by the npm create pylon command are Bun, Node.js and Cloudflare Workers. Other runtimes are also supported but require manual setup.
We’ve tried to make migration smooth. Please refer to the migration guide and let us know if you encounter any issues when migrating.
Key highlights of this release:
- New Runtimes: Pylon now supports multiple runtimes, including Bun, Node.js and Cloudflare Workers.
- Unified Create Command: The new npm create pylon command provides a consistent way to create new Pylon projects.
- Improved Development Server: The new pylon dev command provides a unified development experience across different runtimes.
- Drop of pylon-cli and pylon-server: The @getcronit/pylon-cli and @getcronit/pylon-server packages are no longer required and replaced by the @getcronit/pylon-dev package.
Breaking Changes
If you’re looking for an overview of all breaking changes and how to migrate, please see the migrating from v1 to v2 guide.
If you have any questions or need help, please don’t hesitate to reach out to us on Discord. We’re happy to assist you with the migration process.
Overview Video
Watch how we use the new npm create pylon command to create a new Pylon project and deploy it to Cloudflare Workers in less than 1 minute:
New Runtimes
Pylon now supports multiple runtimes, including Bun, Node.js and Cloudflare Workers. You can choose the runtime that best fits your use case and deploy your service with ease.
To create a new Pylon project with a specific runtime, use the npm create pylon command:
npm create pylon --runtime cf-workers
This command creates a new Pylon project with the Cloudflare Workers runtime. You can also specify other runtimes, such as Node.js or Cloudflare Workers, by passing the --runtime flag.
Pylon also supports various other runtimes:
Be aware that those runtimes require manual setup and configuration.
- Cloudflare Pages
- Deno
- Fastly Compute
- Vercel
- Netlify
- AWS Lambda
- Lambda@Edge
- Azure Functions
- Supabase Functions
- Ali Function Compute
- Service Worker
Unified Create Command
The new npm create pylon command provides a consistent way to create new Pylon projects with different runtimes, templates, client generation and more.
This command streamlines the project creation process and ensures that you have everything you need to get started with Pylon.
To create a new Pylon project, run the following command:
npm create pylon
This command will prompt you to select the runtime, template, and other options for your project. Once you’ve made your selections, the command will create a new Pylon project in the specified directory.
Improved Development Server
Pylon v2 introduces a new pylon dev command that provides a unified development experience across different runtimes.
The pylon dev command starts the development server and automatically reloads your service when you make changes to your code. This command is designed to streamline the development process and make it easier to build and test your services.
To support different runtimes, you can specify the runtime-specific start command using the -c flag:
pylon dev -c 'bun run .pylon/index.js'
This command starts the development server with the specified start command for the Bun runtime. You can replace the command with the appropriate start command for your chosen runtime.
For example, if you’re using Cloudflare Workers, you can start the development server with the following command:
pylon dev -c 'wrangler dev'
This command starts the development server with the wrangler dev command, which is the recommended way to run Cloudflare Workers locally.
Drop of pylon-cli and pylon-server
The @getcronit/pylon-cli and @getcronit/pylon-server packages are no longer required and have been replaced by the @getcronit/pylon-dev package.
Why was the pylon-cli dropped?
The pylon-cli package was used to create new Pylon projects and manage the development server. With the introduction of the npm create pylon command and the pylon dev command, the functionality provided by the pylon-cli package is now handled by the create-pylon package and the pylon-dev package.
Why was the pylon-server dropped?
The pylon-server had only one purpose: to start the server using Bun. With the introduction of multiple runtimes, the pylon-server package became obsolete. The pylon-dev package now handles the development server for all runtimes.
For production, you can now directly execute .pylon/index.js with your runtime-specific command (e.g. bun run .pylon/index.js or node .pylon/index.js). This flexible approach allows you to choose the best deployment strategy for your use case.
Acknowledgements
A big thank you to all who helped with this release ?
- @kleberbaum for his dream that we’ll support Cloudflare Workers, and now we do!
- @dave-calleja for the initial request for multiple runtime support, that led us realise that this is crucial for the future of Pylon.
- @schettn for coding all of this ;)
The above is the detailed content of Announcing Pylon with Multiple Runtime Support. For more information, please follow other related articles on the PHP Chinese website!

Detailed explanation of JavaScript string replacement method and FAQ This article will explore two ways to replace string characters in JavaScript: internal JavaScript code and internal HTML for web pages. Replace string inside JavaScript code The most direct way is to use the replace() method: str = str.replace("find","replace"); This method replaces only the first match. To replace all matches, use a regular expression and add the global flag g: str = str.replace(/fi

This tutorial shows you how to integrate a custom Google Search API into your blog or website, offering a more refined search experience than standard WordPress theme search functions. It's surprisingly easy! You'll be able to restrict searches to y

So here you are, ready to learn all about this thing called AJAX. But, what exactly is it? The term AJAX refers to a loose grouping of technologies that are used to create dynamic, interactive web content. The term AJAX, originally coined by Jesse J

This article series was rewritten in mid 2017 with up-to-date information and fresh examples. In this JSON example, we will look at how we can store simple values in a file using JSON format. Using the key-value pair notation, we can store any kind

Leverage jQuery for Effortless Web Page Layouts: 8 Essential Plugins jQuery simplifies web page layout significantly. This article highlights eight powerful jQuery plugins that streamline the process, particularly useful for manual website creation

Core points This in JavaScript usually refers to an object that "owns" the method, but it depends on how the function is called. When there is no current object, this refers to the global object. In a web browser, it is represented by window. When calling a function, this maintains the global object; but when calling an object constructor or any of its methods, this refers to an instance of the object. You can change the context of this using methods such as call(), apply(), and bind(). These methods call the function using the given this value and parameters. JavaScript is an excellent programming language. A few years ago, this sentence was

jQuery is a great JavaScript framework. However, as with any library, sometimes it’s necessary to get under the hood to discover what’s going on. Perhaps it’s because you’re tracing a bug or are just curious about how jQuery achieves a particular UI

This post compiles helpful cheat sheets, reference guides, quick recipes, and code snippets for Android, Blackberry, and iPhone app development. No developer should be without them! Touch Gesture Reference Guide (PDF) A valuable resource for desig


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),
