Skip to content

Latest commit

 

History

History
58 lines (44 loc) · 1.76 KB

nodejs-apis.md

File metadata and controls

58 lines (44 loc) · 1.76 KB

Node.js APIs

Azion Bundler provides a set of APIs to help you build and test your Node.js projects. The following sections detail the available APIs and how to use them.

Example usage

See more: Buffer Example

import { Buffer } from "node:buffer";

const main = async (event) => {
  const helloBuffer = Buffer.from("Hello Edge!", "utf8");
  console.log(helloBuffer.toString("hex"));
  // 48656c6c6f204564676521
  console.log(helloBuffer.toString("base64"));
  // SGVsbG8gRWRnZSE=

  helloBuffer.write("World", 6, 5, "utf8");
  console.log(helloBuffer.toString());
  // Hello World!
  return new Response(helloBuffer.toString(), { status: 200 });
};

export default main;

Support report

Tests run daily in the Bundler Examples.

Table:

Test Status
Zlib
Process
Path
Os
Http
String Decoder
Crypto
Timers
Stream
Module
Util
Url
Vm
Events
Buffer
Fs
Async Hooks

Last test run date: 12/13/24 04:00:51 AM

Docs support

See support for the Node.js APIs in the https://www.azion.com/en/documentation/products/azion-edge-runtime/compatibility/node/