tree: d7589d36e52cdb2c5e133dbf6d61b5a5f027a10e [path history] [tgz]
  1. .cargo/
  2. benchmark/
  3. examples/
  4. npm/
  5. scripts/
  6. src/
  7. tests/
  8. theme/
  9. .gitignore
  10. .node-version
  11. .npmignore
  12. .npmrc
  13. .prettierignore
  14. build.rs
  15. Cargo.toml
  16. CONTRIBUTING.md
  17. DEPENDENCIES.md
  18. DEPENDENCIES.rust.tsv
  19. devbox.json
  20. devbox.lock
  21. generated.d.ts
  22. generated.js
  23. index.d.ts
  24. index.js
  25. package.json
  26. pnpm-lock.yaml
  27. README.md
  28. tsconfig.json
  29. tsconfig.theme.json
  30. typedoc.json
  31. upgrade.md
  32. vitest.config.mjs
bindings/nodejs/README.md

Apache OpenDALâ„¢ Node.js Binding

npm Website

Installation

npm install opendal

Docs

See our documentation on opendal.apache.org.

To build the docs locally, please run the following commands:

# Only need to run once unless you want to update the docs theme
pnpm run build:theme

# Build the docs
pnpm run docs

Usage

import { Operator } from "opendal";

async function main() {
  const op = new Operator("fs", { root: "/tmp" });
  await op.write("test", "Hello, World!");
  const bs = await op.read("test");
  console.log(new TextDecoder().decode(bs));
  const meta = await op.stat("test");
  console.log(`contentLength: ${meta.contentLength}`);
}

main();

Contributing

License and Trademarks

Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0

Apache OpenDAL, OpenDAL, and Apache are either registered trademarks or trademarks of the Apache Software Foundation.