Pglet Bindings for Node.js and Deno

Pglet client for Node.js

Pglet (“pagelet”) is a rich user interface (UI) framework for programs written in Node.js or any other language. Pglet renders web UI, so you can easily build web apps with Node.js. Knowledge of HTML/CSS/JavaScript is not required as you build UI with controls. Pglet controls are built with Fluent UI React to ensure your programs look cool and professional.

Hello, world!

const pglet = require("pglet");

(async () => {
    let p = await pglet.page();
    await p.send("add text value='Hello, world!'");
})();

Run the sample above with node and in a new browser window you’ll get:

Sample app in a browser

Here is a local page served by an instance of Pglet server started in the background on your computer.

Make it web

Add { web: true } option to pglet.page call:

  let p = await pglet.page({ web: true });
  await p.send("add text value='Hello, world!'");

This time page will be created on Pglet hosted service.

Read JavaScript tutorial for further information and more examples.

Download Details:

Author: pglet

Source Code: https://github.com/pglet/pglet-node

#deno #nodejs #javascript

Pglet Bindings for Node.js and Deno
2.45 GEEK