docsify/docs/_media/example.js
Giulio Ambrogi db97a1d22a Eslint fixes for v4x (#989)
* UPDATE .eslintrc

* UPDATE lint task

* FIX lint errors

* CLEANUP

* FIX no-eq-null warning

* FIX many jsdoc warnings

* FIX jsdoc issues

* FIX jsdoc warnings

* FIX jsdoc

* FIX eqeq and no-eq-null

* ADD lint to travis

* UPDATE test env for eslint
2019-12-30 22:01:46 +05:30

17 lines
323 B
JavaScript

import fetch from 'fetch'
const URL = 'https://example.com'
const PORT = 8080
/// [demo]
const result = fetch(`${URL}:${PORT}`)
.then(function (response) {
return response.json()
})
.then(function (myJson) {
console.log(JSON.stringify(myJson))
})
/// [demo]
result.then(console.log).catch(console.error)