start new:
tmux
start new with session name:
tmux new -s myname
const IPFS = require('ipfs') | |
const os = require('os') | |
const repoPath = os.tmpdir() + '/' + Math.random() | |
const node = new IPFS(repoPath) | |
node.init({}, (err) => { | |
if (err) { throw err } | |
node._repo.config.get((err, config) => { |
var fs = require('fs'); | |
var path = require('path'); | |
// fs.readdir is an async func, it doesn't return any value | |
// see: https://nodejs.org/api/fs.html#fs_fs_readdir_path_options_callback | |
// var lists = fs.readdir(process.argv[2], callback); | |
fs.readdir(process.argv[2], callback); | |
// it yields just a single list, not lists. That list is in fact an array |
var a = 'aaaa' |
optionsheadpostputdeletetraceacceptaccept-charsetaccept-encodingacccache-controlageallow | |
connection | |
content-basecontent-encodingcontent-languagecontent-lengthcontent-location | |
ccontent-range | |
last-modifielocationif-unmodified-sinceexpiresfromhosif-matchif-modified-since | |
max-forwardspragmaproxy-authenticateproxy-authorizationrangereferer | |
retry-afterservertetrailertransfer-encodingupgrade | |
user-agentvaryviawarningwww-authenticatemethodgetstatus200 OKversioHTTP/1.1urlpublic | |
set-cookie | |
keep-aliveorigin100101201202205206300302303304305306307402405406407408409410411412413414415416417502504505203 Non-Authoritative Information204 No Content301 Moved Permanently400 Bad Request401 Unauthorized403 Forbidden404 Not Found500 Internal Server Error501 Not Implemented503 Service UnavailableJan Feb Mar Apr May Jun Jul Aug Sept Oct Nov Dec 00:00:00 Mon, Tue, Wed, Thu, Fri, Sat, Sun, GMTchunked,text/html,image/png,im |
✘ ⮀ ⭠ feat/bootstrap ⮀ ~/code/protocol-labs/_ipfs/js/js-ipfs ⮀ | |
» ipfs files ls / | |
tests | |
npm-registry | |
⭠ feat/bootstrap ⮀ ~/code/protocol-labs/_ipfs/js/js-ipfs ⮀ | |
» ipfs files ls /npm-registry | |
- | |
⭠ feat/bootstrap ⮀ ~/code/protocol-labs/_ipfs/js/js-ipfs ⮀ | |
» ipfs files stat /npm-registry | |
QmWudm6RiNK6tg4kwcei8oXdEuLkPXnMeMaWbq7S33zYac |
ipfs swarm connect /ip4/85.216.106.69/tcp/52267/ipfs/QmSyNirNSqfeSNv7LKgPx8qf9aQy9pfjphxGWXBCXsnbX5 | |
hash=ipfs name resolve QmdNc4B89DxVeiuDKRN5bWdKsAPCmekgmJMkRSdUNa7x9z | |
ipfs files cp /ipfs/$hash /npm-registry |
[email protected] /Users/david/Documents/code/ipfs/node-ipfs-api | |
├─┬ [email protected] | |
│ ├── [email protected] | |
│ ├── [email protected] | |
│ ├─┬ [email protected] | |
│ │ ├─┬ [email protected] | |
│ │ │ ├── [email protected] | |
│ │ │ ├── [email protected] | |
│ │ │ ├── [email protected] | |
│ │ │ └─┬ [email protected] |