🚨 Latest Research:Tanstack npm Packages Compromised in Ongoing Mini Shai-Hulud Supply-Chain Attack.Learn More →
Socket
Book a DemoSign in
Socket

@lightningkite/lightning-server-simplified

Package Overview
Dependencies
Maintainers
3
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lightningkite/lightning-server-simplified

A TypeScript library providing web tools and client utilities for interacting with [Lightning Server](https://github.com/lightningkite/lightning-server), a Kotlin backend framework.

latest
Source
npmnpm
Version
1.2.0
Version published
Maintainers
3
Created
Source

Lightning Server Simplified

A TypeScript library providing web tools and client utilities for interacting with Lightning Server, a Kotlin backend framework.

Installation

npm install @lightningkite/lightning-server-simplified

Usage

REST Endpoints

This library provides a RestEndpoint interface for CRUD operations on resources:

import { RestEndpoint } from '@lightningkite/lightning-server-simplified';

// Assuming you have a RestEndpoint instance for a User model
const users: RestEndpoint<User> = /* ... */;

// Query users
const userList = await users.query({ condition: { name: { Equal: "John Doe" } } });

// Insert a new user
const newUser = await users.insert({ _id: 'user-id', name: 'John Doe', email: 'john@example.com' });

// Modify a user
const updatedUser = await users.modify('user-id', { name: { Assign: 'Jane Doe' } });

Conditions and Modifications

Use Condition and Modification types to build complex queries and updates:

import { Condition, Modification } from '@lightningkite/lightning-server-simplified';

const condition: Condition<User> = {
  name: { Equal: 'John' }
};

const modification: Modification<User> = {
  name: { Assign: 'Jane' }
};

API Overview

  • apiCall: Low-level API call utility with support for JSON and file uploads.
  • RestEndpoint: Interface for RESTful CRUD operations.
  • Condition: Type for building query conditions.
  • Modification: Type for building update modifications.
  • Fetching utilities: Basic and bulk fetchers for data retrieval.
  • Mock endpoints: Tools for mocking REST endpoints in tests.

Building

npm run build

This compiles the TypeScript source to JavaScript in the dist/ directory.

Testing

npm test

Runs the Jest test suite with coverage.

Contributing

This project is part of the Lightning Server repository. Please see the main repository for contribution guidelines.

License

MIT

Keywords

ktor

FAQs

Package last updated on 07 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts