Javascript is one of the most used languages in the world, According to StackOverflow.
This makes total sense, as we can run it in the frontend , backend , mobile , wearables , cars or even... fridgeders!
By making CORTX and "Object Storage Technologies" (which are traditionally ruled by devops or backend engineers at best) available for frontend, mobile and fullstack engineers we open new doors for CORTX and the millions developers in the JS eco-system.
$ npm install --save cortx-js-sdk
cortx-js-sdk
exposes a fully wrapped AWS.S3 class to communicate with CORTX
const cortx = new CORTX(S3_ENDPOINT, S3_ACCESS_KEY_ID, S3_SECRET_ACCESS_KEY);
const s3 = cortx.createS3Connector();
in this example, the s3
object is a proxy object to Cortx.
const res = await s3
.putObject({
Bucket: 'testbucket/',
Key: 'file.txt',
Body: Buffer.from(file),
ACL: 'public-read',
})
.promise();
-
any example shown on Amazon s3 KB can be interchangeably used with the
cortx.createS3Connector()
object. -
Find more examples on the project github under the
./example/src/
folder
TBD , once Cortx release MOTR APIs.
TBD , once Cortx integrates with GCS.
cortx-sdk-js
comes with its own type definitions. battery included ⚡.
if you're using "import/export" syntax in your project, you can simply import CORTX from "cortx-js-sdk";
to get the full types definitions.
Absolutly! the package is a thin lightweight wrapper which is "bundle-size" friendly ⚖