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

synflows-crm

v16.13.2

Published

This API, written in node.js using the Hapi framwork ( https://hapi.dev/ ), is used to store people and their products within the Synflows Platform.

Downloads

4

Readme

Synflows CRM REST API

Introduction

This API, written in node.js using the Hapi framwork ( https://hapi.dev/ ), is used to store people and their products within the Synflows Platform.

This Api is following the Synflows Api Guidelines: https://dev.azure.com/Synflows/Synflows%20development/_wiki/wikis/Synflows-development.wiki/3/Synflows-API-Guidelines

The OpenApi (Swagger) specification can be found at: http://{hostname}:{portnumber}/documentation

Getting Started

Install all dependencies required for the project using the command npm install.

Run database migrations

npm run db:migrate

Compiles and hot-reloads for development

npm run dev

Run unit tests

npm run test

Configuration

Make a copy of .env.example and rename it to .env. Put here your authorization for launching the project on localhost. This loads only when you run npm run dev.

Docker

Build the docker image: docker build -t synflows/crm --build-arg NPM_RC="$(cat ~/.npmrc)" .

Save docker image to a tar file: docker save -o docker/synflows-crm.docker.tar synflows/crm

Copy docker image to server: scp docker/synflows-crm.docker.tar [email protected]:docker-images

Connecting with RabbitMQ

If you want to connect your local dev environment with a RabbitMQ container on another server, you need to establish a SSH-tunnel between the two. On your dev machine start the SSH-connection to the server:

ssh -4 [email protected] -L 5672:172.19.0.6:5672 -L 15672:172.19.0.6:15672

With the SSH-tunnel in place, you can connect to ports 5672 and 15672 on localhost. There are three .env settings which allow you to configure the connection to RabbitMQ

IP-address of the RabbitMQ server and credentials to connect:

RMQ_CONNECT=user:password@localhost

Which queues to create at startup. This is only needed once and can be done from receiving side as well. To make sure no messages are lost, you can create the queue before the first message is sent. Multiple queues can be specified using a |-separator:

RMQ_QUEUES=waxtrapp06|theotherqueue

You can include the CRM-data in the message to RabbitMQ. Only supported in a development environment.

RMQ_INCLUDE_DATA=true

Recieved messages

On the target server run the following command to peek at the first message in the queue. This will set the redelivered flag on that message to TRUE:

curl -su 'user:password' -H "content-type:application/json" -X POST http://172.19.0.6:15672/api/queues/%2f/waxtrapp06/get -d'{"count":1,"ackmode":"ack_requeue_true","encoding":"auto","truncate":50000}' | json_reformat