clodynix
v0.1.4
Published
Clodynix is a modern, efficient, and developer-friendly CDN package offering seamless content delivery with an intuitive dashboard and comprehensive documentation. Simplify your content delivery with Clodynix's powerful and scalable platform.
Maintainers
Readme
Clodynix
A lightning-fast CDN solution powered by modern technology to deliver your content seamlessly.
📦 Installation
npm install clodynix
# or
yarn add clodynix
# or
pnpm add clodynix🔧 Usage
import { Clodynix } from 'clodynix';
const clodynix = new Clodynix({
apiKey: process.env.ClodynixSecret || '',
});
// Get a file
const file = await clodynix.getFile({ fileId: 'your-file-id' });
// Upload a file
const formData = new FormData();
formData.append('file', someFile);
const createdFile = await clodynix.createFile({ formData });🔑 Authentication
Set your Clodynix secret token as an environment variable:
export ClodynixSecret=your-secret-token📚 API Reference
getFile(options)
Retrieves a file by ID
options.fileId: string - The ID of the file to retrieve
createFile(options)
Uploads a new file
options.formData: FormData - Form data containing the file to upload
📝 License
MIT © Clodynix Team
