0.0.15 • Published 5 years ago

@josematos/base-lib v0.0.15

Weekly downloads
1
License
ISC LICENSE - SEE...
Repository
-
Last release
5 years ago

base-lib

FEATURES

  • automatic loading screen on view loading and http calls
  • global error handler with logging to console, centralized logging and notification
  • custom error 500 page (route: /error)
  • http call logging for performance analysis to console, centralized logging and notification
  • http call caching system to local storage (encrypted or not)

INSTALLATION

npm install @josematos/base-lib

CONFIGURATION

Add BaseLibModule to your app.module

import { BaseLibModule } from '@josematos/base-lib';

imports: [ BaseLibModule ]

in your global scss file:

@import '~angular-notifier/styles.css';

install the missing modules:

npm install angular-notifier
npm install @ngx-translate/core --save
npm install crypto-js

in your app component define your preferences:

  constructor( private settings: BaseSettingsService ) {
  }

  ngOnInit(): void {
    if (!isDevMode()) {
      this.settings.setProductionMode(true);
    }

    this.settings.setCentralizedLoggingApiUrl('http://localhost:5001/');
    this.settings.setApplicationName('base-test');
    this.settings.setMaxCacheAge(24 * 60 * 60 * 1000);
    this.settings.setEncryptionEnabled(true);
    this.settings.setEncryptionSecretKey('some String to encript data');
    this.settings.setLoadingScreenImageUrl("assets/images/loader_gif.gif");
    this.settings.setNotifierLogLevel(1);
    this.settings.setConsoleLogLevel(4);
  }

and in your app component html:

  <base-loading-screen></base-loading-screen>
  <notifier-container></notifier-container>

LICENSE

ISC License

Copyright (c) 2019, José Matos

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago