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

@marsxklink/backend-common

v1.21.12

Published

K-Link's Backend's common / globally shared and reusable things including: Models, Libs, Configs / Constants, etc

Downloads

6

Readme

Backend Common

Common / globally shared and reusable things including: Models, Fns, Config / Constants, etc

How to install this package

Every developer that want to install (not publishing) this package just need to run command npm install @marsxklink/backend-common to install this package.

How to publish new version of this package

Every developer that want to publish new version of this package must add k-link's npm account into their local machine. And we recommend that this package should be maintained by one delegated developer. So we can easily track the changes and publishing centralized in only one person. And please note that adding k-link's npm account only needs to be performed once.

And this published package should only used for production deployment. We recommend to use npm link, npm unlink command strategy to use in daily development. We will explain it in other section of this README.

So for the first step, add k-link's npm account into your local machine by run command: npm adduser and you will prompted some information input as below:

[user@hostname]$ npm adduser
[npm notice] Log in on https://registry.npmjs.org/
Username: <username>
Password: <password>
Email: (this IS public) [email protected]
Logged in as <username> on https://registry.npmjs.org/.

And please note that adding k-link's npm account only needs to be performed once. Next, follow these steps below:

  • git pull your latest changes. We recommend do it in master branch.
  • Open file package.json then increase version of this package via version attribute.
  • Run npm publish --access public to publish the package.
  • Then we recommend to sync master branch to development branch.

How to use / interact with this package in daily development

You will be tired if you do publish for every changes that the team made to use / consume changes of this package. So we recommend you to use npm uninstall, npm unlink and npm link command strategy. NPM have ability to share usage of a package locally without publishing to npm server.

For example, We will show you how to use backend-common project in klink-backend-order-service project. Follow these steps below:

  1. Provide a special directory to work on klink-backend-order-service project. For example, let's say your working directory at /home/developer1/Kmart-Project
  2. At your working directory, clone klink-backend-order-service project.
  3. Also at your working directory, clone backend-common project.
  4. cd backend-common
  5. git pull origin development run this inside backend-common project directory
  6. npm install run this inside backend-common project directory
  7. npm link run this inside backend-common project directory
  8. cd .. , cd klink-backend-order-service
  9. Do these commands inside klink-backend-order-service project directory
    • npm uninstall @marsxklink/backend-common
    • npm unlink @marsxklink/backend-common
    • npm link @marsxklink/backend-common
  10. Then validate the results by run command: npm run start:dev
  11. Repeat step number 5 if there are any new changes in backend-common project.
  12. And do not forget to run npm install @marsxklink/backend-common if you are ready to push your work to project's remote repository.
  13. Repeat step number 8 if you continue to work on klink-backend-order-service project.

You need to clone backend-common only once inside your working directory. This example working directory below will make it more clear

├── 📂 Working_Directory/
├────── 📂 backend-common/
├────── 📂 klink-backend-order-service/
├────── 📂 klink-backend-product-service/
├────── 📂 klink-backend-user-service/
├────── 📂 klink-backend-scheduler-n-queue/