This is a maintained listing of all the different ways to debug and profile Node.js applications. If there is something missing or an improvement, post a comment! :)
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
// Credentials for use with Kinvey | |
// NOTE: This example shows passing in the master secret. | |
// In a production environment, these credentials should be protected i.e. | |
// they should be requested from the user or secured via a login screen | |
var kinvey_app_key = 'kidxxxx'; | |
var kinvey_secret = 'master secret'; | |
// Modified sync to add authorization header for use with Kinvey | |
var authenticatedKinveySync = function(method, model, options) { |
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
#!/bin/bash | |
# node.js using PPA (for statsd) | |
sudo apt-get install python-software-properties | |
sudo apt-add-repository ppa:chris-lea/node.js | |
sudo apt-get update | |
sudo apt-get install nodejs npm | |
# Install git to get statsd | |
sudo apt-get install git |
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
worker_processes 1; | |
user nobody nogroup; | |
pid /var/run/nginx.pid; | |
error_log /var/log/nginx/error.log; | |
events { | |
worker_connections 64; | |
} |
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
[program:gunicorn-graphite] | |
command=/usr/local/bin/gunicorn_django -u www-data -g www-data -b 127.0.0.1:8080 --log-file=/opt/graphite/storage/log/webapp/gunicorn.log /opt/graphite/webapp/graphite/settings.py | |
process_name=%(program_name)s | |
autostart=true | |
autorestart=true | |
stopsignal=QUIT | |
user=www-data | |
[program:carbon-cache] | |
command=python /opt/graphite/bin/carbon-cache.py --debug start |
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
#!/bin/bash | |
# | |
# Shell script to automatically configure a new Flask, nginx and uWSGI based blog | |
# on an Amazon EC2 instance. | |
# [Note]: modified to run on Ubuntu 12.04 | |
# | |
# See http://bit.ly/MeGwjD for more information! | |
# | |
# If you are forking this for your own custom configuration script, see the following other gists: | |
# https://gist.github.com/3071737 |
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
#!/bin/bash | |
NICKNAME="bhangm" | |
# Setup Supervisor | |
echo "[program:warrior] | |
command=run-pipeline --concurrent 2 /home/ubuntu/yahoomessages-grab/pipeline.py $NICKNAME | |
numprocs=1" \ | |
> /etc/supervisor/conf.d/warrior.conf |
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
#!/bin/bash | |
set -o nounset | |
set -o errexit | |
set -o xtrace | |
# Install dependencies | |
apt-get update | |
apt-get install -y build-essential lua5.1 liblua5.1-0-dev python python-setuptools python-dev git-core openssl libssl-dev python-pip rsync gcc make git supervisor | |
pip install seesaw |
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
--- | |
# Deploys a new version of foo | |
- name: Deploy new version of foo | |
hosts: tag_type_appserver:&tag_stage_prod | |
user: ubuntu | |
sudo: true | |
gather_facts: false | |
serial: 1 | |
vars_prompt: |
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 updateApp(){ | |
readRowsHelper(); | |
}; | |
function getKinveyParameters(){ | |
return { | |
kinvey_app_id: " YOUR APP ID ", | |
kinvey_master_secret: " YOUR MASTER SECRET " | |
}; | |
}; |
OlderNewer