Adapters
Explore the different runtimes supported by Carbon, including serverless options like Cloudflare Workers and traditional server environments like Node.js and Bun.
Carbon is designed to be flexible and adaptable to different server environments. Whether you prefer a serverless runtime like Cloudflare Workers, a traditional server environment like Node.js, or a lightweight alternative like Bun, Carbon functions the same across all runtimes. This means you can choose the runtime that best fits your needs without worrying about compatibility. Below, we compare serverless and traditional server environments to help you make an informed decision:
-
Serverless: Serverless runtimes are a great choice if you want a bot that can scale automatically and handle a large number of interactions with low latency. Keep in mind that serverless runtimes may have limitations on execution time and memory usage, so make sure to choose a runtime that fits your bot's requirements.
-
Server: Traditional server environments are a great choice if you want full control over your server environment and the ability to deploy your bot on any server. Keep in mind that you will need to manage your server environment, including scaling, monitoring, and maintenance.
Serverless Runtimes
Cloudflare Workers
Cloudflare Workers is a quick and free option for hosting your bot, and is the primary runtime that we at Buape use Carbon on. It provides a scalable and globally distributed platform, ideal for handling a large number of interactions with low latency.
Next.js
Next.js allows you to integrate your bot with your Next.js app, running Carbon on an API route, and can be deployed on Vercel. This is perfect for managing both your bot and web app in a single project.
Cloudflare Workers
Deploy your Carbon bot using Cloudflare Workers for a scalable, serverless environment.
Next.js
Integrate your Carbon bot with a Next.js application for seamless ingration with your website.
Servers
Node.js
Node.js is a flexible choice for running your bot on any server. It supports various hosting providers and offers full control over your server environment.
Bun
Bun is a fast and lightweight alternative to Node.js, designed for improved performance and lower resource usage. It is ideal for developers prioritizing performance.
Node.js
Deploy your Carbon bot using Node.js for a flexible and robust server environment.
Bun
Run your Carbon bot with Bun for a fast and lightweight alternative to Node.js.
Other Runtimes
If your preferred runtime is not listed, you can use the handle
method to integrate Carbon with any server environment.
Last updated on