@pluritech/server-service
v3.0.2
Published
## Installation
Downloads
8
Keywords
Readme
@pluritech/server-service
Installation
To install this library, run:
$ npm install @pluritech/server-service --save
Consuming this library
You can import this library in any Angular application by running:
$ npm install @pluritech/server-service
and then from your Angular AppModule
:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
// Import your library
import { ServerServiceModule } from '@pluritech/server-service';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
// Specify your library as an import
ServerServiceModule.forRoot()
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Now, we can use ServerService to control authentication
Features
Time out - Scope Global
You can provide one limit time in (ms) to the requests, if this limit time exceed, the request will break out and error of TimeOut will be throw. To provide the limit time, just put it as param on forRoot(time?: number): The time default is: 8000 ms
imports: [
BrowserModule,
// Specify your library as an import with limit time of 10 seconds
ServerServiceModule.forRoot(10000: number)
],
Development
To generate all *.js
, *.d.ts
and *.metadata.json
files:
$ npm run build
To lint all *.ts
files:
$ npm run lint
License
MIT © Luis H. Moreno