Related tutorial: http://cd64.de/mysql-cli
SQL joins infografic: http://cd64.de/sql-joins
Related tutorial: http://cd64.de/mysql-cli
SQL joins infografic: http://cd64.de/sql-joins
// Module dependencies | |
var express = require('express'), | |
mysql = require('mysql'); | |
// Application initialization | |
var connection = mysql.createConnection({ | |
host : 'localhost', | |
user : 'root', |
function initPushwoosh() | |
{ | |
var pushNotification = window.plugins.pushNotification; | |
//set push notifications handler | |
document.addEventListener('push-notification', function(event) { | |
var title = event.notification.title; | |
var userData = event.notification.userdata; | |
if(typeof(userData) != "undefined") { |
# Android | |
platforms/android/assets/www | |
platforms/android/bin/ | |
platforms/android/gen/ | |
platforms/android/res/xml/config.xml | |
# iOS | |
platforms/ios/build/ | |
platforms/ios/CordovaLib/build/ | |
platforms/ios/www |
#Installation Guide for Android SDK / ADT Bundle on Windows
To setup the Android SDK on windows,
Installing Java Development Kit
Installing Android ADT Bundle
// | |
// _oo0oo_ | |
// o8888888o | |
// 88" . "88 | |
// (| -_- |) | |
// 0\ = /0 | |
// ___/`---'\___ | |
// .' \\| |// '. | |
// / \\||| : |||// \ | |
// / _||||| -:- |||||- \ |
Deploying a node app with Forever is great...until your server restarts unexpectedly. Then your app stops running and you have to re-deploy.
To get around this, we're going to run our node app as an Upstart service. Upstart services are great, because, once started, the system auto-restarts them if they fail, or if the server restarts.
###Step 1: Create a service for your node app
ssh root@youripaddress
service node-app start
##Setup your server (this would ideally be done with automated provisioning)
npm install -g forever
##Install flightplan
npm install -g flightplan
npm install flightplan --save-dev
(wherever it says url.com, use your server's domain or IP)
Login to new server as root, then add a deploy user
sudo useradd --create-home -s /bin/bash deploy
sudo adduser deploy sudo
sudo passwd deploy
And Update the new password
Here's all you have to do to add clustering to your node.js application.
cluster.js
, and run cluster.js
instead of server.js
(or /bin/www, or whatever it's called for your project)server.js
filevar cluster = require('cluster');
if (cluster.isMaster) {
// Count the machine's CPUs
var cpuCount = require('os').cpus().length;