Download from here:
MD5: 59bab8f71f8c096cd3f72cd73851515d
Rename it to:
Download from here:
MD5: 59bab8f71f8c096cd3f72cd73851515d
Rename it to:
#!/bin/bash | |
# chkconfig: 2345 98 02 | |
# | |
# description: PM2 next gen process manager for Node.js | |
# processname: pm2 | |
# | |
### BEGIN INIT INFO | |
# Provides: pm2 | |
# Required-Start: $local_fs $remote_fs | |
# Required-Stop: $local_fs $remote_fs |
d_start() { | |
} | |
d_stop() { | |
} | |
case "$1" in |
app.config(function($stateProvider, $urlRouterProvider, $locationProvider) { | |
$locationProvider.hashPrefix('!').html5Mode(true) | |
}) | |
app.run(function($rootScope, $location) { | |
$rootScope.$on('$locationChangeStart', function(e, next, current) { | |
//prevent first load |
process.env.DEBUG = '*' | |
var express = require('express') | |
var app = express() | |
var middleware = function(req, res, next) { | |
console.log('Trying to put a middleware here') | |
next(null) | |
}, |
<VirtualHost *:80> | |
ServerAdmin infos@soyuka.me | |
ServerName localhost | |
ProxyRequests Off | |
<Proxy *> | |
Order deny,allow | |
Allow from all | |
</Proxy> |
#!/usr/bin/env bash | |
SRC=$(cd $(dirname "$0"); pwd) | |
source "${SRC}/include.sh" | |
cd $file_path | |
echo -e "\033[1mRunning tests:\033[0m" | |
var express = require('express'); | |
var app = express(); | |
var reg = /^[a-z]+$/; | |
app.use(require('body-parser')()); | |
var param = function(req, res, next, val) { | |
return val.match(reg) ? next() : next(new Error(val + ' is not a valid param')) | |
} |
// Callback hell | |
do.this(function(callback) { | |
then.do.that(function() { | |
then.end(function() { | |
callback() | |
}) |