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
interface State { | |
dogImageUrl: string; | |
} | |
export class DogPicture extends React.PureComponent<{}, State> { | |
componentDidMount() { | |
const dogService = new DogService(); | |
dogService.getRandomImageUrl() | |
.then(dogImageUrl => this.setState({ dogImageUrl })) | |
} |
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
/** | |
* This is sample to show multiprocess programming in node.js | |
*/ | |
const cluster = require('cluster'); | |
const http = require('http'); | |
const numberOfCPUs = require('os').cpus().length; | |
if (cluster.isMaster) { |
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
[config] | |
SCM_COMMAND_IDLE_TIMEOUT=300 | |
command = azure-deploy.cmd |
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 install tsd -g | |
tsd install node |
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 fse = require('fs-extra'); | |
var path = require('path'); | |
// This will be the name that will appear in the Azure Portal | |
var workerName = 'worker'; | |
console.info('Checking if should create web job folders'); | |
// Making sure this is a web job in case we want this deployment to also | |
// contain web site roles |
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
{ | |
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": {...}, | |
"resources": [ | |
{ | |
"apiVersion": "2015-04-01", | |
"name": "[parameters('hostingPlanName')]", | |
"type": "Microsoft.Web/serverfarms", | |
"location": "[parameters('siteLocation')]", |
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 WARN package.json [email protected] No repository field. | |
npm WARN package.json [email protected] No license field. | |
npm WARN deprecated [email protected]: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible. | |
npm ERR! Windows_NT 6.2.9200 | |
npm ERR! argv "D:\\Program Files (x86)\\nodejs\\4.2.4\\node.exe" "D:\\Program Files (x86)\\npm\\2.14.12\\node_modules\\npm\\bin\\npm-cli.js" "install" "--production" | |
npm ERR! node v4.2.4 | |
npm ERR! npm v2.14.12 | |
npm ERR! code ECONNRESET | |
npm ERR! errno ECONNRESET | |
npm ERR! syscall read |
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
{ | |
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": {...}, | |
"resources": [ | |
{ | |
"apiVersion": "2015-04-01", | |
"name": "[parameters('hostingPlanName')]", | |
"type": "Microsoft.Web/serverfarms", | |
"location": "[parameters('siteLocation')]", |