Publishing Client
Publishing the Client
You can publish your client to NpmJS, allowing anyone to install and use your Milkio project by installing the client. Alternatively, you can publish it to private npm repositories, restricting access to only authorized individuals.
There is a difference between directly installing the client locally and publishing it. When you install it locally, any modifications you make in one project will be reflected in another project in real-time. However, when you publish it to an npm repository, the content of your client is fixed at the moment of publishing. When you release an updated version, other users may still be using the older version. Therefore, when developing your Milkio project, it’s important to strive for backward compatibility and ensure that calling your Milkio project with older versions of the client will not result in errors.
Publishing
Publishing to either NpmJS or a private npm repository is straightforward. First, you need to log in, which can be done by running npm login
or placing a .npmrc
file in your project directory. Once you’re logged in, run the following command to publish your client:
Security
Before publishing your client, ensure its security by making sure you haven’t included any passwords or private keys in your package.