Skip to main content

Node.js (Modern ES Modules)

For Node.js or modern JavaScript frameworks (e.g., React, Vue, Vite, Webpack), install via your preferred package manager:

Using npm

npm install lunex-http

Using Yarn

yarn add lunex-http

Using pnpm

pnpm add lunex-http

Once installed, import and use the client:

import LunexClient from 'lunex-http';

const client = new LunexClient('https://api.example.com', {
Authorization: 'Bearer YOUR_TOKEN'
});

This method is ideal for projects using modern JavaScript toolchains, including Node.js, React, Vue, Vite, Webpack, or Rollup. This package includes full TypeScript support with no additional configuration required.