Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

carlo

> 编程语言
Open source

Web rendering surface for Node applications

9.3K stars0 likes3 views
WebsiteGitHub

About

Web rendering surface for Node applications

Carlo - headful Node app framework

❗Carlo is no longer maintained.


Carlo provides Node applications with Google Chrome rendering capabilities, communicates with the locally-installed browser instance using the Puppeteer project, and implements a remote call infrastructure for communication between Node and the browser.

API | FAQ | Contributing
What can I do?

With Carlo, users can create hybrid applications that use Web stack for rendering and Node for capabilities:

  • For Node applications, the web rendering stack lets users visualize the dynamic state of the app.
  • For Web applications, additional system capabilities are accessible from Node.
  • The application can be bundled into a single executable using pkg.
How does it work?
  • Carlo locates Google Chrome installed locally.
  • Launches Chrome and establishes a connection over the process pipe.
  • Exposes a high-level API for rendering in Chrome with the Node environment.

Usage

Install Carlo

npm

bash
npm i carlo
# yarn add carlo

Carlo requires at least Node v7.6.0.

Example - Display local environment

Save file as example.js

javascript
const carlo = require('carlo');

(async () => {
  // Launch the browser.
  const app = await carlo.launch();

  // Terminate Node.js process on app window closing.
  app.on('exit', () => process.exit());

  // Tell carlo where your web files are located.
  app.serveFolder(__dirname);

  // Expose 'env' function in the web environment.
  await app.exposeFunction('env', _ => process.env);

  // Navigate to the main page of your app.
  await app.load('example.html');
})();

Save file as example.html

xml
<script>
async function run() {
  // Call the function that was exposed in Node.
  const data = await env();
  for (const type in data) {
    const div = document.createElement('div');
    div.textContent = `${type}: ${data[type]}`;
    document.body.appendChild(div);
  }
}
</script>
<body onload="run()">

Run your application:

bash
node example.js

Check out systeminfo and terminal examples with richer UI and RPC-based communication between the Web and Node in the examples folder.

API

Check out the API to get familiar with Carlo.

Testing

Carlo uses Puppeteer project for testing. Carlo application and all Carlo windows have corresponding Puppeteer objects exposed for testing. Please refer to the API and the systeminfo project for more details.

Contributing to Carlo

Look at the contributing guide to get an overview of Carlo's development.

FAQ

Q: What was the motivation behind this project when we already have Electron and NW.js? How does this project differ from these platforms, how does it achieve something that is not possible/harder with Electron or NW.js?

  • One of the motivations of this project is to demonstrate how browsers that are installed locally can be used with Node out of the box.
  • Node v8 and Chrome v8 engines are decoupled in Carlo, providing a maintainable model with the ability to independently update underlying components. Carlo gives the user control over bundling and is more about productivity than branding.

Q: Can a Node app using Carlo be packaged as a Desktop app?

The pkg project can be used to package a Node app as a Desktop app. Carlo does not provide branding configurability such as application icons or customizable menus, instead, Carlo focuses on productivity and Web/Node interoperability. Check out the systeminfo example and call pkg package.json to see how it works.

Q: What happens if the user does not have Chrome installed?

Carlo prints an error message when Chrome can not be located.

Q: What is the minimum Chrome version that Carlo supports?

Chrome Stable channel, versions 70.* are supported.

Issues· 57 open

View all issuesOpen on GitHub
  • #179

    [INFO] Introducing: Valet - Carlo spiritual successor

    Updated Jan 13, 2026
  • #173

    Dead?

    Updated Apr 15, 2021
  • #73

    serveOrigin issues with webpack-dev-server

    Updated Mar 15, 2020
  • #138

    existing chrome instances block launch

    Updated Feb 21, 2020
  • #27

    Allow other browsers

    enhancementUpdated Feb 10, 2020
  • #167

    Why the bundle package size is so large?

    Updated Jan 19, 2020
  • #166

    The packed executable file cannot work

    Updated Jan 8, 2020
  • #165

    Chrome takes 6s to load when not specifying executable path

    Updated Dec 8, 2019
  • #95

    Request with a wrong referer

    Updated Nov 3, 2019
  • #164

    Exit the process directly when failed to found `chrome`?

    Updated Oct 7, 2019

> Tags

JavaScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 29, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言