To install this library, run:
$ npm install @pluritech/server-service --saveYou can import this library in any Angular application by running:
$ npm install @pluritech/server-serviceand 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
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)
],To generate all *.js, *.d.ts and *.metadata.json files:
$ npm run buildTo lint all *.ts files:
$ npm run lintMIT © Luis H. Moreno