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!

JavaScript is widely used in websites, mobile applications, desktop applications and server-side programming. 1) In website development, JavaScript operates DOM together with HTML and CSS to achieve dynamic effects and supports frameworks such as jQuery and React. 2) Through ReactNative and Ionic, JavaScript is used to develop cross-platform mobile applications. 3) The Electron framework enables JavaScript to build desktop applications. 4) Node.js allows JavaScript to run on the server side and supports high concurrent requests.

Python is more suitable for data science and automation, while JavaScript is more suitable for front-end and full-stack development. 1. Python performs well in data science and machine learning, using libraries such as NumPy and Pandas for data processing and modeling. 2. Python is concise and efficient in automation and scripting. 3. JavaScript is indispensable in front-end development and is used to build dynamic web pages and single-page applications. 4. JavaScript plays a role in back-end development through Node.js and supports full-stack development.

C and C play a vital role in the JavaScript engine, mainly used to implement interpreters and JIT compilers. 1) C is used to parse JavaScript source code and generate an abstract syntax tree. 2) C is responsible for generating and executing bytecode. 3) C implements the JIT compiler, optimizes and compiles hot-spot code at runtime, and significantly improves the execution efficiency of JavaScript.

JavaScript's application in the real world includes front-end and back-end development. 1) Display front-end applications by building a TODO list application, involving DOM operations and event processing. 2) Build RESTfulAPI through Node.js and Express to demonstrate back-end applications.

The main uses of JavaScript in web development include client interaction, form verification and asynchronous communication. 1) Dynamic content update and user interaction through DOM operations; 2) Client verification is carried out before the user submits data to improve the user experience; 3) Refreshless communication with the server is achieved through AJAX technology.

Understanding how JavaScript engine works internally is important to developers because it helps write more efficient code and understand performance bottlenecks and optimization strategies. 1) The engine's workflow includes three stages: parsing, compiling and execution; 2) During the execution process, the engine will perform dynamic optimization, such as inline cache and hidden classes; 3) Best practices include avoiding global variables, optimizing loops, using const and lets, and avoiding excessive use of closures.

Python is more suitable for beginners, with a smooth learning curve and concise syntax; JavaScript is suitable for front-end development, with a steep learning curve and flexible syntax. 1. Python syntax is intuitive and suitable for data science and back-end development. 2. JavaScript is flexible and widely used in front-end and server-side programming.

Python and JavaScript have their own advantages and disadvantages in terms of community, libraries and resources. 1) The Python community is friendly and suitable for beginners, but the front-end development resources are not as rich as JavaScript. 2) Python is powerful in data science and machine learning libraries, while JavaScript is better in front-end development libraries and frameworks. 3) Both have rich learning resources, but Python is suitable for starting with official documents, while JavaScript is better with MDNWebDocs. The choice should be based on project needs and personal interests.


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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

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.

Dreamweaver Mac version
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version
Useful JavaScript development tools