Installation
You can install the CDN Client as a Node.js module or import it directly in the browser.
Node.js module
Use your favourite package manager to install the CDN Client.
shell
npm install @localazy/cdn-client
1
CDN Client is written in TypeScript and provides type definitions. You can import it using TypeScript, ESM, or CommonJS syntax.
typescript
import { CdnClient } from '@localazy/cdn-client';
1
Browser
You can import the CDN Client directly in the browser using a script tag. Choose between ESM or UMD bundle.
html
<script type="module">
import { CdnClient } from 'https://cdn.jsdelivr.net/npm/@localazy/cdn-client/+esm';
</script>
1
2
3
2
3