1.0.0 • Published 6 years ago

ngx-gun v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

ng-gun

Angular 5+ implementation of Gun.js. Supports AOT and SSR.

Based on the incredible work by the Gun.js contributors.

Install

npm install ngx-gun --save

Config

Configure the ng-gun options which are passed:

import { BrowserModule, BrowserTransferStateModule} from '@angular/platform-browser'
import { HttpClientModule } from '@angular/common/http'
import { NgModule } from '@angular/core'
import { RouterModule } from '@angular/router'

// Gun Module
import { NgGunModule, NgGunOptions } from '../ngGun'
const ngGunOptions: NgGunOptions = {
  // peers: [location.origin + '/gun']
}

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule.withServerTransition({
      appId: 'proxy-engine-ng'
    }),
    HttpClientModule,
    BrowserTransferStateModule,
    RouterModule,
    ...
    NgGunModule.forRoot(ngGunOptions)
  ],
  bootstrap: [
    AppComponent
  ]
})
export class AppModule {
}

Build status