import { S3Client, PutObjectCommand } from '@aws-sdk/client-s3';
const s3 = new S3Client({ region: 'us-east-1' });
await s3.send(new PutObjectCommand({
Bucket: 'my-bucket',
Key: 'hello.txt',
Body: 'Hello, World!',
}));
console.log('File uploaded to S3');import { BlobServiceClient } from '@azure/storage-blob';
const client = BlobServiceClient.fromConnectionString(process.env.AZURE_STORAGE_CONNECTION_STRING);
const container = client.getContainerClient('my-container');
const blockBlob = container.getBlockBlobClient('hello.txt');
await blockBlob.upload('Hello, World!', 13);
console.log('Uploaded to Azure Blob Storage');// Using Cloudflare Workers fetch API
const response = await fetch(
`https://api.cloudflare.com/client/v4/zones/${ZONE_ID}/dns_records`,
{
headers: {
Authorization: `Bearer ${process.env.CF_API_TOKEN}`,
'Content-Type': 'application/json',
},
}
);
const { result } = await response.json();
console.log(result.map(r => r.name));import { Storage } from '@google-cloud/storage';
const storage = new Storage({ keyFilename: 'service-account.json' });
const [files] = await storage.bucket('my-bucket').getFiles();
files.forEach(file => console.log(file.name));import { createClient } from '@supabase/supabase-js';
const supabase = createClient(process.env.SUPABASE_URL, process.env.SUPABASE_ANON_KEY);
const { data, error } = await supabase
.from('posts')
.select('id, title, created_at')
.order('created_at', { ascending: false })
.limit(10);
console.log(data);