1.21.9 ā€¢ Published 4 months ago

@marsxklink/backend-common v1.21.9

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

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) akun.it.dnm@gmail.com
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
  1. Then validate the results by run command: npm run start:dev
  2. Repeat step number 5 if there are any new changes in backend-common project.
  3. And do not forget to run npm install @marsxklink/backend-common if you are ready to push your work to project's remote repository.
  4. 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/
1.21.9

4 months ago

1.21.8

5 months ago

1.21.6

10 months ago

1.21.7

7 months ago

1.21.4

11 months ago

1.21.5

11 months ago

1.21.0

1 year ago

1.21.1

1 year ago

1.21.2

1 year ago

1.21.3

1 year ago

1.20.8

1 year ago

1.20.5

2 years ago

1.20.6

2 years ago

1.20.7

1 year ago

1.20.3

2 years ago

1.20.4

2 years ago

1.19.2

2 years ago

1.20.1

2 years ago

1.20.2

2 years ago

1.20.0

2 years ago

1.19.0

2 years ago

1.18.1

2 years ago

1.18.0

2 years ago

1.19.1

2 years ago

1.17.2

2 years ago

1.17.1

2 years ago

1.17.0

2 years ago

1.16.4

2 years ago

1.16.3

2 years ago