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

schema-mapper-store

v0.4.2

Published

A node API, CLI and REST API to manage schemas and store data.

Downloads

9

Readme

schema-mapper-store

A node API, CLI and REST API to manage schemas and store data.

Build status Docs status Code Climate Dependencies License

Usage

CLI

Installation

npm install -g schema-mapper-store
# using build in help
schema-mapper-store --help

# using opts
schema-mapper-server \
 --project [ file --path /tmp/project ] \
 --expose [ websocket --port 7000 ] \
 --expose [ rest --port 7100 ] \
 --expose [ admin --port 7200 ] \
 --driver [ elasticsearch --host http://localhost:9200 ] \
 --driver [ postgresql --host localhost --user postgres --password schemamapper ] \
 --driver [ leveldb --path /tmp/level ]

# using environment variables
export STORE_PROJECT_STRATEGY=file
export STORE_PROJECT_FILE_PATH=/tmp/project
export STORE_EXPOSE_STRATEGIES=websocket,rest,admin
export STORE_EXPOSE_WEBSOCKET_PORT=7000
export STORE_EXPOSE_REST_PORT=7100
export STORE_EXPOSE_ADMIN_PORT=7200
export STORE_DRIVER_STRATEGIES=elasticsearch,postgresql,leveldb
export STORE_DRIVER_ELASTICSEARCH_HOST=http://localhost:9200
export STORE_DRIVER_POSTGRESQL_HOST=localhost
export STORE_DRIVER_POSTGRESQL_USER=postgres
export STORE_DRIVER_POSTGRESQL_PASSWORD=schemamapper
export STORE_DRIVER_LEVELDB_PATH=/tmp/level
schema-mapper-server

Node API

Installation

npm install --save schema-mapper-store
var store = require('schema-mapper-store');

store.createServer({
  project: 'file',
  expose: ['websocket'],
  storage: ['leveldb', 'elasticsearch', 'postgresql'],
  config: {
    project: {
      path: '/tmp/project'
    },
    expose: {
      websocket: {
        port: 9000
      }
    },
    storage: {
      leveldb: {
        path: '/tmp/leveldb'
      },
      elasticsearch: {
        hosts: ['http://localhost:9200']
      },
      postgresql: {
        user: 'postgres',
        password: 'schemamapper',
        host: 'localhost'
      }
    }
  }
});

Docker compose

store:
  image: schemamapper/store
  ports:
   - "7000:7000"
   - "7100:7100"
   - "7200:7200"
  links:
    - postgresql
    - elasticsearch
  volumes:
   - /data-leveldb:/data-leveldb
   - /data-projects:/data-projects
  environment:
    - STORE_PROJECT_STRATEGY=file
    - STORE_PROJECT_FILE_PATH=/data-schemamapper
    - STORE_EXPOSE_STRATEGIES=websocket,rest,admin
    - STORE_EXPOSE_WEBSOCKET_PORT=7000
    - STORE_EXPOSE_REST_PORT=7100
    - STORE_EXPOSE_ADMIN_PORT=7200
    - STORE_DRIVER_STRATEGIES=elasticsearch,postgresql,leveldb
    - STORE_DRIVER_ELASTICSEARCH_HOST=http://elasticsearch:9200
    - STORE_DRIVER_POSTGRESQL_HOST=postgresql
    - STORE_DRIVER_POSTGRESQL_USER=postgres
    - STORE_DRIVER_POSTGRESQL_PASSWORD=schemamapper
    - STORE_DRIVER_LEVELDB_PATH=/data-leveldb
    - DEBUG=*
postgresql:
  image: schemamapper/postgresql-postgis-uuid
  environment:
    - POSTGRES_PASSWORD=schemamapper
  ports:
    - "5432:5432"
  volumes:
    - /data-postgresql:/var/lib/postgresql/data
elasticsearch:
  image: elasticsearch
  ports:
    - "9200:9200"
  volumes:
    - /data-elasticsearch:/usr/share/elasticsearch/data
authorizedkeys:
  image: tutum/authorizedkeys
  environment:
    - AUTHORIZED_KEYS=ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEApzubzNrYNSYv66Hbv92ChEJLS+2d0+u4FvktO1iE6jFRx2UL9Xk8SmGoP6+MYPrzaZutZudqrcf8tBH028snPzMOKoXiNJeqS0wGeGegR4l1lHHfk5T+1F5aziEBpun7etV1M0iNWEP8oK8Rr7NDMqnYOGUTFa8k/fuwvOslDMxmESX5wh6J0k8dDVTrSIXCJnpL0AAwFfuGwl5mm8iCZwi4xTyINwwjkZMAthG/BhJV4FolTxyFKGC/ZN+a418SUgLP6FUJ7C6HCjwjNZON77IJHquQsYJc+Gqz69H6jodYeRXD9f3UMI/JL2k1ti3aDqmnF+W0NWhFO51RSKLQvQ== [email protected]
  volumes:
    - /root:/user:rw

API docs

API Docs

Licence

MIT