@myrmidon/cadmus-refs-geonames-lookup
TypeScript icon, indicating that this package has built-in type declarations

5.0.2 • Public • Published

Cadmus Refs GeoNames Lookup

This library was generated with Angular CLI version 17.3.0.

Configuration

To use GeoNames you must provide your GeoNames user name, assumed that you have enabled API access for that account.

To configure your app:

(1) add your username to the src/environments/environment.prod.ts file, e.g.:

export const environment = {
  production: true,
  geoNamesUserName: 'yourUserNameHere'
};

(2) be sure to add src/environments/environment.prod.ts to .gitignore so you don't accidentally publish it.

(3) provide the username via token under your app's providers (appConfig):

// GeoNames lookup (see environment.prod.ts for the username)
{
  provide: GEONAMES_USERNAME_TOKEN,
  useValue: environment.geoNamesUserName,
}

⚠️ Be sure to use the Angular CLI’s --configuration=production flag when building for production, as this will ensure the correct environment file is used. If you want to debug with your username, just provide it in src/environments/environment.ts.

Readme

Keywords

Package Sidebar

Install

npm i @myrmidon/cadmus-refs-geonames-lookup

Weekly Downloads

7

Version

5.0.2

License

none

Unpacked Size

65.1 kB

Total Files

12

Last publish

Collaborators

  • myrmidon