Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Commit

Permalink
feat: shutdown spec
Browse files Browse the repository at this point in the history
  • Loading branch information
richardschneider committed Jan 30, 2018
1 parent 0c40084 commit 9d91267
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions SPEC/MISCELLANEOUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,28 @@ ipfs.dns('ipfs.io', (err, path) => {
A great source of [examples][] can be found in the tests for this API.

[examples]: https://github.com/ipfs/interface-ipfs-core/blob/master/src/miscellaneous.js

#### `shutdown`

This comment has been minimized.

Copy link
@daviddias

daviddias Jan 31, 2018

Contributor

@richardschneider needs to be added to the TOC on the main README.md

This comment has been minimized.

Copy link
@richardschneider

richardschneider Feb 1, 2018

Author Contributor

Its in the Miscellaneous API, so already linked from the main README

This comment has been minimized.


> Stop the ipfs daemon
##### `Go` **WIP**

##### `JavaScript` - ipfs.shutdown([callback])

`callback` must follow `function (err) {}` signature, where `err` is an error if the operation was not successful.
If no `callback` is passed, a promise is returned.

**Example:**

```JavaScript
ipfs.shutdown((err) => {
if (err) {
throw err
}
})
```

A great source of [examples][] can be found in the tests for this API.

[examples]: https://github.com/ipfs/interface-ipfs-core/blob/master/src/miscellaneous.js

0 comments on commit 9d91267

Please sign in to comment.