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

@pratiko-framework/cli

v1.1.0

Published

Pratiko - a Progressive Event-Driven Microservices Framework

Downloads

3

Readme

Pratiko

Pratiko - a Progressive Event-Driven Microservices Framework

Installation

sudo yarn global add @pratiko-framework/cli

You can also use NPM sudo npm install --global @pratiko-framework/cli

Usage

The Pratiko-cli is a tool to help out during the early development workflow, with commands to scaffold repository and deal with chores such as dockerization.

Start a new module with:

pratiko start Foo

cd Foo

This will create a new repository for your module

+ Foo/
+     .git
+     module.ptk.yaml

At this point, we recomend you to fulfill the module.ptk.yaml config file with information that will be useful in the next steps. Open it and write:

module_name: Foo

http_port: 9090

broker:
  name: broker
  port: 4222
  cluster_id: 'foo-broker'
  monitoring: false

db:
  config_file: ./db.ts
  docker_image: mongo:4.2.3-bionic
  packages:
    dependencies:
      - mongodb: ^3.5.5
    dev_dependencies:
      - '@types/mongodb': ^3.5.2

In the above example, we adopted MongoDB as our module's db. We set the mongo:4.2.3-bionic docker image to be injected in the docker-compose.yaml files in the components (more in the next section). We also defined the packages used, both dependencies and dev_dependencies, which will be added to the package.json file, accordingly. Finally, we let you configure the connection you way, informing a config_file to be used. That file will simply be copied to the components when you run the next command.

Now create a HTTP-responsible component, the Diplomat, with

pratiko create Diplomat

During the execution of this command, pratiko will create a directory to contain Diplomat files, such as

  • package.json, which will be inhanced with the MongoDB dependencies
  • src/index.ts, the entrypoint of the component
  • src/db.ts, the given config file for the database
  • Dockerfile, exposing the http_port defined (default: 9090)
  • docker-compose.yaml, containing configuration for
    • diplomat,
    • broker,
    • db
  • dev toolbelt files, a scaffold with configurations for
    • ESLint & Prettier for Linter rules
    • Jest for testing
    • Nodemon for hot reload the component

So the repository now looks like this:

Foo/
    .git
    module.ptk.yaml
+   Diplomat/
+       Dockerfile
+       docker-compose.yaml
+       .eslintrc.js
+       jest.config.js
+       nodemon.json
+       package.json
+       .prettierrc.js
+       src/
+           index.ts
+           db.ts
+       tsconfig.json

Now, the Diplomat is ready to receive some code! Check details in the Pratiko Guide.

The usage for de Meerkat is the same, just run pratiko create Meerkat instead of pratiko create Diplomat