If you haven't already set your NPM author info, now you should:
npm set init.author.name "Your Name"
npm set init.author.email "[email protected]"
npm set init.author.url "http://yourblog.com"
npm adduser
| var http = require('http'); | |
| var url = require('url'); | |
| var path = require('path'); | |
| var fs = require('fs'); | |
| var base = path.join(process.cwd(), process.argv[2] || ''); | |
| var port = process.argv[3] || 8888; | |
| var extensionRegex = /\.([0-9a-z]+)(?:[\?#]|$)/i; | |
| var contentTypeMap = { | |
| html: 'text/html', |
If you haven't already set your NPM author info, now you should:
npm set init.author.name "Your Name"
npm set init.author.email "[email protected]"
npm set init.author.url "http://yourblog.com"
npm adduser
| function fetchJSON(options, cb) { | |
| fetch(options). | |
| then(res => res.json()). | |
| then(json => cb(null, json)). | |
| catch(err => cb(err)) | |
| } |