How to run a long-lived IPFS process
## Table of contents
To start a daemon on the CLI, use the daemon
command:
jsipfs daemon
The IPFS Daemon exposes the API defined in the HTTP API spec. You can use any of the IPFS HTTP-API client libraries with it, such as: ipfs-http-client.
If you want a programmatic way to spawn a IPFS Daemon using JavaScript, check out the ipfsd-ctl module.
const { createFactory } = require('ipfsd-ctl')
const factory = createFactory({
type: 'proc' // or 'js' to run in a separate process
})
const node = await factory.create()
// print the node ide
console.info(await node.id())