0.2.0 • Published 8 months ago

@inialum/token-generator v0.2.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
8 months ago

@inialum/token-generator

CLI tool to generate a token for INIALUM services.

npm version

Usage

  1. Install the package:

    pnpm add -D @inialum/token-generator

    Or if you prefer to run it directly without installing it:

    pnpm dlx @inialum/token-generator -- <options>
  2. Create a .env file in the root of your project:

    TOKEN_SECRET=<secret>

    You can create random secret value for TOKEN_SECRET with the following command:

    openssl rand -base64 32
  3. Add the following script to your package.json:

    {
      "scripts": {
        "generate-token": "inialum-token-generator --service <service_name> --env-file <path_to_env_file>"
      }
    }

    --service is required. It is the name of the service that will use the token.
    --env-file is optional. If not provided, the tool will look for a .env file in the root of your project.

  4. Run the script in your project:

    pnpm run generate-token

License

Licensed under Apache License 2.0.

0.2.0

8 months ago

0.1.4

8 months ago

0.1.3

8 months ago

0.1.1

8 months ago