0.2.11 • Published 7 months ago

ms-localization v0.2.11

Weekly downloads
6
License
-
Repository
-
Last release
7 months ago

Localization microservice

Starting the service locally

  1. Make sure there is a env-files directory on the same level as this directory
  • The env-files directory should contain files with env variables for all services
  1. Create a .env file in the root of the project and add all environment variables
  • Some of the services have a package @vertt/assert-env-config installed. If used, the function assertEnvConfig(config) from the package checks whether all env variables are initialized. If this condition is not met, it throws an error and the service is unreachable. The assertEnvConfig(config) function is called in the index.ts file. If you want to start the service without initializing all env variables, just remove this function from the code.
  • Mandatory environment variables are:
    • PORT - To initialize a unique port
    • databaseUrl - To setup a connection to the database
    • headerTokenMicroservice - To be able to communicate with other services
    • npmToken - To log in to npm with the private user who is owner of the private vertt
  1. Run the init-npm-token script
  • This would authorize your local machine to access Vertt's private NPM repository and you would be able to install the private @vertt/* packages
  • Verify the NPM access by running npm install
  1. Start the service with npm run start-local