https://nodejs.org/en/download/ npm install --global windows-build-tools
This file contains 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
Error.captureStackTrace(targetObject[, constructorOpt])# | |
targetObject <Object> | |
constructorOpt <Function> | |
Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called. | |
const myObject = {}; | |
Error.captureStackTrace(myObject); | |
myObject.stack; // similar to `new Error().stack` |
This file contains 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
const WebSocket = require('ws'); | |
const wss = new WebSocket.Server({ port: 8080 }); | |
wss.on('connection', function connection(ws) { | |
ws.on('message', function incoming(message) { | |
console.log('messsage received: %s', message); | |
}); | |
This file contains 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 url = 'ws://localhost:8080/' | |
var connection = new WebSocket(url) | |
connection.onerror = error => { | |
console.log(`WebSocket error: ${error}`) | |
} | |
connection.onopen = () => { | |
connection.send('hey') | |
} |
This file contains 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
Download and install | |
https://commaster.net/content/installing-memcached-windows | |
Default port : 11211 | |
To set value | |
memcached.set('foo', 'bar', 10, function (err) { | |
}) | |
Note :- 10 is the expiry time is 10 seconds |
This file contains 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
/** | |
* Created by prmadi on 8/20/2015. | |
*/ | |
var http = require('http'); | |
var port = process.env.PORT || '3000'; | |
// Memory Leak | |
function LeakingClass() { | |
} |
This file contains 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
Hapi (short for (Http)API, pronounced “happy”) |
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> GRANT ALL PRIVILEGES ON . TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION; Query OK, 0 rows affected (0.13 sec)
This file contains 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
https://github.com/bmorelli25/simple-nodejs-weather-app |
This file contains 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
import React ,{Component} from "react"; | |
import { connect } from 'react-redux'; | |
alert(connect) | |
class Counter extends Component{ | |
constructor(props){ | |
super(props); |