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
[program:service-name] | |
numprocs=1 | |
process_name=%(process_num)02d | |
command = /usr/local/bin/node index.js | |
directory = /path/to/project | |
autostart = true | |
autorestart = true | |
environment = NODE_PATH="." | |
user = ubuntu | |
stdout_logfile = /var/log/supervisor/%(program_name)s-stdout.log |
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
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; | |
} | |
upstream websocket { | |
server 127.0.0.1:3001; | |
} | |
server { |
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
sudo rabbitmqctl add_user username password | |
sudo rabbitmqctl set_permissions -p / username ".*" ".*" ".*" | |
sudo rabbitmqctl set_user_tags username administrator |
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
server { | |
listen 80; | |
root /var/www/yourdomain.com/public; | |
index index.html index.htm; | |
server_name yourdomain.com; | |
location / { | |
default_type "text/html"; |
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
<snippet> | |
<content><![CDATA[ | |
export const CREATE_${1:this} = 'CREATE_${1:this}'; | |
export const CREATE_${1:this}_RESPONSE = 'CREATE_${1:this}_RESPONSE'; | |
export const CREATE_${1:this}_ERROR = 'CREATE_${1:this}_ERROR'; | |
export const UPDATE_${1:this} = 'UPDATE_${1:this}'; | |
export const UPDATE_${1:this}_RESPONSE = 'UPDATE_${1:this}_RESPONSE'; | |
export const UPDATE_${1:this}_ERROR = 'UPDATE_${1:this}_ERROR'; | |
export const FETCH_${1:this}S = 'FETCH_${1:this}'; | |
export const FETCH_${1:this}S_RESPONSE = 'FETCH_${1:this}_RESPONSE'; |
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
<snippet> | |
<content><![CDATA[ | |
describe('#${1:methodName}', function f() { | |
describe('Positive tests', function f() { | |
before(function f(done) { | |
done(); | |
}); |
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
<snippet> | |
<content><![CDATA[ | |
export function create${1:ModelName}Response(data) { | |
AppDispatcher.handleServerAction({ | |
actionType: constants.CREATE_${2:MODEL_NAME}_RESPONSE, | |
data: data | |
}); | |
} | |
export function create${1:ModelName}Error(data) { |
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
<snippet> | |
<content><![CDATA[ | |
export function ${1:server call}Response(data) { | |
AppDispatcher.handleServerAction({ | |
actionType: constants.${2:CONSTANT_NAME}_RESPONSE, | |
data: data | |
}); | |
} | |
export function ${1:server call}Error(data) { |
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
<snippet> | |
<content><![CDATA[ | |
export const ${1:SERVER_CALL_NAME} = '${1:SERVER_CALL_NAME}'; | |
export const ${1:SERVER_CALL_NAME}_RESPONSE = '${1:SERVER_CALL_NAME}_RESPONSE'; | |
export const ${1:SERVER_CALL_NAME}_ERROR = '${1:SERVER_CALL_NAME}_ERROR'; | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>async-constant</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<scope>source.js</scope> |
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 pino = require('pino'); | |
const config = require('config'); | |
const logger = pino({level: config.logLevel}); | |
exports.getLogger = function getLogger(module) { | |
return logger.child({ module: module }); | |
}; | |
exports.getMethodEndLogger = function getMethodEndLogger(logger, method, input) { |
OlderNewer