Skip to content
/ core Public

The implementation of the different HTTP API endpoint handlers

Notifications You must be signed in to change notification settings

eik-lib/core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3951220 · Feb 4, 2025
Nov 15, 2024
Dec 9, 2019
Aug 8, 2024
May 8, 2020
Nov 15, 2024
Nov 15, 2024
Nov 15, 2024
Aug 8, 2024
Aug 8, 2024
Jul 29, 2024
Feb 4, 2025
Aug 13, 2024
Aug 13, 2024
Aug 8, 2024
Feb 4, 2025
Aug 8, 2024
Aug 8, 2024
Feb 2, 2022
Aug 8, 2024
Aug 8, 2024

Repository files navigation

@eik/core

This module holds the core server functionality of @eik/service. Each HTTP API endpoint has its own class handling the specific path and method.

API

http

This namespace holds the different HTTP API endpoint handlers. Each handler is a class with an async handler method.

import { http } from "@eik/core";

let pkgGetHandler = new eik.http.PkgGet({ organizations, sink, logger });

let response = await pkgGetHandler.handler(
	request,
	type,
	name,
	version,
	extras,
);

For a more complete usage example, see the implementation in @eik/service.

prop

A gollection of globals holding base paths.

import { prop } from "@eik/core";

const { base_auth, base_map, base_pkg, base_npm } = prop;

HealthCheck

A health check implementation that does a create, read and delete check against the configured storage sink.

import { HealthCheck } from "@eik/core";

const health = new HealthCheck({
	logger,
	sink,
});

await health.check();