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

@i2analyze/example-connector

v1.0.1

Published

The `example-connector` provides eleven services that return data from a hardcoded data set:

Downloads

732

Readme

Example connector

The example-connector provides eleven services that return data from a hardcoded data set:

  • Example Search demonstrates how to specify a form that users can interact with.
  • Example Seeded Search 1 ('find like this') demonstrates how to find records that are similar to a set of Person seed records.
  • Example Seeded Search 2 ('expand') demonstrates how to expand a set of Person seed records to find connections to other records.
  • Example Seeded Search 3 ('edit property values') demonstrates how to update property values of the seed records provided to the search.
  • Async Example Search demonstrates how to create an asynchronous query that can report progress back to the user through the use of substatus messages.
  • API Key Authenticated Search demonstrates how to request an API key from a user in order to run the service.
  • Search Within a Data Source demonstrates how to change the behavior of a service based on data in the request.
  • Semantic Property Search demonstrates how to require seed records that have values for properties with specific semantic types.
  • Search for Stations Within an Area demonstrates how to use the geospatialArea logical type in a service.
  • Example Search with Custom Source Identifiers is similar to Example search, but also demonstrates how to use source identifiers.
  • Example Seeded Search 2 ('expand') with Custom Source Identifiers is similar to Example Seeded Search 2 ('expand'), but also demonstrates how to use source identifiers.

Running the example connector

You can run the example connector by executing an npm package directly, or by cloning its repository.

Running without cloning the repository

Execute the following command:

npx @i2analyze/example-connector

After the server starts, its configuration is available at http://localhost:3700/config.

Note: To configure the connector, you can use environment variables, as defined in Configuring the connector server. The connector also uses dotenv to load any .env configuration files in the working directory.

Running the server during development

To run the server in development mode:

  1. Clone the repository.

  2. Navigate to the samples/example-connector directory.

  3. Install the packages that the server requires.

    npm install
  4. Build the service and start the connector server:

    npm start

In this mode, the server monitors the project source files for changes, and rebuilds the service if necessary.