🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

meadow-endpoints

Package Overview
Dependencies
Maintainers
2
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

meadow-endpoints

Automatic API endpoints for Meadow data.

latest
Source
npmnpm
Version
4.0.7
Version published
Maintainers
2
Created
Source

Meadow Endpoints

Automagic REST endpoints for basic CRUD operations on the Retold framework.

This library generates REST endpoints in a consistent manner. Endpoints have the following features:

  • Authentication
  • Resource Authorization
  • CRUD Operations
  • Dynamic Filtering
  • Schema Validation

The design philosophy is not to cover every possible use case, but to cover the 99% via configuration. The last 1% is easily hand-craftable.

To best use this library, it should be in conjunction with stricture and orator.

Docker Development Environment

  • Run this command to build this image:
npm run docker-dev-build-image
  • Run this command to create and run the local container:
npm run docker-dev-run
  • Go to http://localhost:12343/ in a web browser

  • The password is "retold"

  • Right now you (may) need to delete the node_modules folders and regenerate it for Linux, depending on your OS.

Pattern Description to Expand

const libMeadowEndpointsControllerBase = require('meadow-endpoints').ControllerBase;

class MySpecialLogController inherits libMeadowEndpointsControllerBase.LogControllerBase
{
	constructor(pMeadowEndpoints, pOptions)
	{
		super(pMeadowEndpoints, pOptions);
	}

	// Overload info to do something special
	info(pLogText, ...pLogObjects)
	{
		super(pLogText, ...pLogObjects);
		console.log('### THIS CONTROLLER DO MAGIC STUFF WITH'+pLogText);
	}
}

class MyMeadowEndpointsController
{
	constructor(pMeadowEndpoints, pOptions)
	{
		super(pMeadowEndpoints, pOptions);

		this._LogController = new mySpecialLogController(pMeadowEndpoints, pOptions);

		this.initializeDefaultUnsetControllers(pMeadowEndpoints, pControllerOptions);
	}
}

module.exports = MyMeadowEndpointsController;
let libMySpecialController = require('TheCodeAbove.js');

let tmpMeadow = new Meadow('INITIALIZE THE DAL');

let tmpMeadowEndpoints = new MeadowEndpoints(tmpMeadow, { Controller: libMySpecialController });

Keywords

crud

FAQs

Package last updated on 19 Sep 2025

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