This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. | |
. | |
. | |
"license": "MIT", | |
"babel": { | |
"presets": [ | |
"env", | |
"react" | |
] | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = require('path'); | |
var HtmlWebpackPlugin = require('html-webpack-plugin'); | |
module.exports = { | |
entry: './app/index.js', | |
output: { | |
path: path.resolve(__dirname, 'dist'), | |
filename: 'index_bundle.js' | |
}, | |
module: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
background : green; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var r = JSON.parse(xhr.responseText); | |
var dis = "current IP:" + r.ip + " | |
" | |
document.write(dis); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function processRequest(e){ | |
if(xhr.readyState == 4 && xhr.status == 200) {} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xhr.send(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var xhr = new XMLHttpRequest(); | |
xhr.open('GET', "//ipinfo.io/json", true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var xhr=new XMLHttpRequest(); | |
xhr.open("GET","http://ipinfo.io/json", true); | |
xhr.send(); | |
xhr.addEventListener("readystatechange", processRequest , false); | |
function processRequest(e){ | |
if(xhr.readyState == 4 && xhr.status == 200) { | |
var r = JSON.parse(xhr.responseText); | |
var dis = "current IP:" + r.ip | |
document.write(dis); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm ERR! Linux 4.4.0-64-generic | |
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" | |
npm ERR! node v7.6.0 | |
npm ERR! npm v4.3.0 | |
npm ERR! code ELIFECYCLE | |
npm ERR! errno 1 | |
npm ERR! science.mozilla.org@1.0.0 start: `npm run build && npm-run-all --parallel server:dev watch:**` | |
npm ERR! Exit status 1 | |
npm ERR! | |
npm ERR! Failed at the science.mozilla.org@1.0.0 start script 'npm run build && npm-run-all --parallel server:dev watch:**'. |
NewerOlder