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

nfl-pro-client-gateway-service

v1.0.18

Published

GraphQL backend client gateway for NFLPro

Downloads

6

Readme

Client-Gateway Service

Compile Typescript

Run yarn compile which will run the typescript compiler (tsc) using the tsconfig.build.json file for compiler settings. This compile is for the build pipeline. It does not include sourcemaps as part of its output.

Run with Debug port open

Run yarn start:debug, which uses nodemon to run the server and detect changes in any .ts and .json files. This can be configured through a nodemonConfig key in package.json or by creating a nodemon.json file in the root of the project. The command is run with exec because there were some issues with properly clearing the port being used for development when the server would auto-restart.

Run tests

The command yarn test is the base command for running tests. If you want to run with coverage or have tests re-run as you change code, use yarn test:coverage or yarn test:watch respectively. Additional commands can be passed to jest in the normal method. For example, yarn test --watch and yarn test:watch accomplish the same thing. This is one of the things run on pre-commit.

Linting

Your editor should be set up to enable auto linting and fix on save. If you don't like a rule then use .eslintrc.js to modify it in some way.

Typings

TypeScript typings are in the ./typings directory and will be picked up by the tsconfig.json file. These files are how you provide typings and declarations for libraries that may not have them included. It is also how you extend existing types from libraries like Express. A Request example is included.

VSCode and WebStorm

The .idea and .vscode folders have been intentionally committed. For WebStorm, it is set up to watch files and fix linting errors as well as format with prettier. There is also a run command set up tied to yarn start:debug, debugging and breakpoints work with this if you're on the latest version of WebStorm. VSCode is set up with a debug task to connect to the service when run via yarn start:debug, with breakpoints functioning properly.

Docker

If you want to run the dev container locally you can use a command such as docker run --env-file .env -p 127.0.0.1:8081:8081 -p 127.0.0.1:9229:9229 --name nfl-service-template -v "$(pwd)/src:/usr/app/src" nfl-service-template

You can run all nfl services locally using docker-compose. See the README in the project's root for more details.

Pre-commit Hooks

There are three precommit commands that run via the yarn precommit command: yarn lint:check, yarn test, and yarn format:check. When committing changes to a given folder within the mono-repo this command will be run via lerna, and use Husky to make sure the precommit hook is run.

They can be bypassed with git commit -m "My scumbag commit" --no-verify. To add your own inconvenience into the commit process you can run ./node_modules/.bin/husky add .husky/pre-commit "command", for example ./node_modules/.bin/husky add .husky/pre-commit "yarn remove-large-files".

If you commit from the service directory it will skip precommit hooks. Make sure you're doing your commits from the top level to avoid introducing linting or formatting errors, or failing tests.