npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@similie/http-connector

v0.0.17

Published

![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg) ![npm Version](https://img.shields.io/npm/v/@similie/http-connector)

Downloads

891

Readme

HTTP Connector for Model Connectors

License: MIT npm Version

Table of Contents

Introduction

HTTP Connector is a specialized connector within the Model Connectors framework designed for front-end applications. It facilitates seamless CRUD (Create, Read, Update, Delete) operations by communicating with RESTful APIs, ensuring consistent model management across different implementation environments.

Whether you're building a React, Vue, or Angular application, the HTTP Connector provides a unified interface to interact with your backend services, abstracting the complexities of HTTP requests and responses.

Features

  • Unified CRUD Operations: Perform create, read, update, and delete operations with a consistent API.
  • TypeScript Support: Leverage strong typing for safer and more predictable code.
  • Configurable Endpoints: Easily configure base URLs and endpoints to match your API structure.
  • Authentication Support: Integrate authentication mechanisms like JWT tokens seamlessly.
  • Error Handling: Built-in mechanisms to handle and propagate errors effectively.
  • Extensible: Customize and extend functionalities to fit specific project needs.

Installation

Install the @similie/http-connector package via npm:

npm install @similie/http-connector
import {
  GlobalConnection,
  Model,
  IEntity,
} from "@similie/model-connect-entities";
import { HTTPConnector } from "@similie/http-connector";
GlobalConnection.startInstance(new HTTPConnector("https://api.example.com"));

interface IUser extends IEntity {
  name: string;
  age: number;
  email: string;
}
class UserModel extends Model<IUser> {}

const um = new UserModel();

um.find({ where: { name: "boomo", age: { ">=": 30 } } })
  .fetch()
  .then((users: IUser[]) => {
    console.log("My users", users);
  });

See Model Connect Entities for more information on how to use the Model Connect framework.

Contributing

We welcome contributions from the community and encourage you to help improve this project! Whether you’re fixing bugs, adding features, or proposing enhancements, your input is highly valued.

Pull Requests

We gladly accept pull requests. If you have a fix, enhancement, or idea, follow these steps to contribute: 1. Fork the Repository: Clone your fork locally to begin development. 2. Create a Branch: Use a descriptive name for your branch, such as feature/new-connector-type or bugfix/issue-123. 3. Write and Test Your Code: Ensure that your changes meet our standards and include tests where appropriate. 4. Submit a Pull Request: When your work is ready, open a pull request to the main branch, describing your changes clearly.

Adding New Connector Types

We especially encourage the development of new connector types to expand use cases. If you’re implementing a connector for a specific system, database, or platform, here’s how you can contribute: 1. Review Existing Connectors: Familiarize yourself with the structure and design of current connectors. 2. Follow the Guidelines: Maintain consistent naming conventions, design patterns, and documentation practices. 3. Provide Documentation: Include a clear README or guide detailing how to configure and use your connector. 4. Submit Tests: Provide test cases to verify functionality and ensure compatibility with the system.

Need Help?

If you’re unsure where to start or have questions about your contribution, don’t hesitate to open a discussion or issue. We’re here to collaborate and make this project better together.

Thank you for your interest in contributing! We’re excited to see what you’ll build.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Similie

Similie is a technology company based out of Timor-Leste, dedicated to developing innovative solutions that support international development initiatives and climate-change adaption. Our mission is to harness the power of technology to drive positive change and improve lives around the world. With a focus on sustainability, community engagement, and social impact, we strive to create products and services that make a real difference in people's lives.