@cortex-dev/app-api
v1.0.0
Published
API utilities for Cortex applications
Readme
@cortex-dev/app-api
A TypeScript package for Cortex applications.
Installation
npm install @cortex-dev/app-apiUsage
import { CortexApi, createCortexApi } from "@cortex-dev/app-api";
// Using the class directly
const api = new CortexApi({ apiKey: "your-api-key" });
api.initialize();
// Using the factory function
const api2 = createCortexApi({ apiKey: "your-api-key" });
api2.initialize();
// Async usage
const data = await api.getData();
console.log(data);Development
# Install dependencies
npm install
# Build the package
npm run build
# Watch for changes during development
npm run build:watch
# Lint the code
npm run lint
# Type check
npm run type-checkPublishing
# Build and publish to npm
npm publishThe prepublishOnly script will automatically clean and build before publishing.
