Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stradivario/gapi-ipfs-daemon
https://github.com/stradivario/gapi-ipfs-daemon
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/stradivario/gapi-ipfs-daemon
- Owner: Stradivario
- Created: 2018-09-20T20:48:40.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T01:22:46.000Z (about 2 years ago)
- Last Synced: 2024-11-14T14:34:30.211Z (about 1 month ago)
- Language: JavaScript
- Size: 1.24 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @Gapi Ipfs Daemon (Beta)
##### More information about IPFS system can be find here [IPFS-WIKI](https://en.wikipedia.org/wiki/InterPlanetary_File_System)
##### For questions/issues you can write ticket [here](http://gitlab.youvolio.com/gapi/gapi-ipfs-daemon/issues)
##### This module is intended to be used with [GAPI](https://github.com/Stradivario/gapi) or [RXDI](https://github.com/rxdi/main)## Installation and basic examples:
##### To install this Gapi module, run:```bash
$ npm install @gapi/ipfs-daemon --save
```## Consuming @gapi/ipfs-daemon
Without configuration
##### Import inside AppModule or CoreModule
```typescriptimport { Module } from '@rxdi/core';
import { IpfsDaemonModule } from '@gapi/ipfs-daemon';@Module({
imports: [
IpfsDaemonModule.forRoot(),
]
})
export class CoreModule { }```
> Default Gateway port: 8080; Default Api port: 5001;
`options` can be passed
```typescript
IpfsDaemonModule.forRoot({
remote: true | false,
type: 'js' | 'go' | 'proc',
config: {
Addresses: {
API: '/ip4/127.0.0.1/tcp/5001',
Gateway: '/ip4/127.0.0.1/tcp/8080',
Swarm: [ '/ip4/0.0.0.0/tcp/4001', '/ip6/::/tcp/4001' ]
}
}
})
```Interact with Ipfs-daemon
note: keep in mind that this is beta testing contribution is appreciated
```typescript
import { Inject, Service } from '@rxdi/core';
import { IPFS_DAEMON } from '@gapi/ipfs-daemon';@Service()
export class IpfsTestService {constructor(
@Inject(IPFS_DAEMON) private ipfs: IPFS_DAEMON
) {}}
```
TODO: Better documentation...
Enjoy ! :)