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
Buenas, | |
Sí, claro: puedes tener varias aplicaciones de Node.js en la misma máquina andando, escuchando cada una por su puerto, y necesitas un proxy inverso para que distribuya el juego según la ruta. Por ejemplo: | |
Una aplicación web (Node.js) que escucha por el puerto 9000. | |
Una aplicación de administración (Node.js) que escucha por el 9010. | |
Un API (Node.js) que escucha por el puerto 9020. | |
Y un nginx que escucha por el 80, y redirige /web al puerto 9000, /admin a 9010 y /api al 9020. | |
El proxy inverso tiene la ventaja de que filtra requests inválidas y protege en general contra posibles vulnerabilidades en Node.js. Además, es mucho más fácil hacer keep-alive desde Node.js si todas las peticiones vienen del mismo proceso, con lo que el rendimiento es mejor. | |
Y, ¿qué mejor proxy inverso que nginx? Pues ahora que lo dices... Yo últimamente uso HAProxy que está pensado específicamente para hacer de proxy inverso. La configuración queda mucho más sencilla y se puede configurar un pool de máquinas, el algoritmo de di |
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
#!/bin/bash -x | |
welcome() { | |
echo " _ _____________ ___ _____ _____ " | |
echo "| | | | ___ \ _ \/ _ \_ _| ___|" | |
echo "| | | | |_/ / | | / /_\ \| | | |__ " | |
echo "| | | | __/| | | | _ || | | __| " | |
echo "| |_| | | | |/ /| | | || | | |___ " | |
echo " \___/\_| |___/ \_| |_/\_/ \____/" | |
echo |
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
<link rel="import" href="../components/polymer/polymer.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
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
### Constructor | |
### Static Variables | |
### Instance Variables | |
### Static Methods (use `=>`) | |
@static_method: => |
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
#!/bin/bash | |
## Brew update | |
cd "$(brew --prefix)" | |
git fetch origin | |
git reset --hard origin/master | |
brew update | |
brew upgrade | |
brew cleanup |
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
2014-01-27T00:47:46.606159+00:00 heroku[api]: Deploy a00bd0e by kikohumanbeatbox@gmail.com | |
2014-01-27T00:47:46.711233+00:00 heroku[api]: Release v5 created by kikohumanbeatbox@gmail.com | |
2014-01-27T00:47:46+00:00 heroku[slug-compiler]: Slug compilation finished | |
2014-01-27T00:47:47.236486+00:00 heroku[web.1]: State changed from crashed to starting | |
2014-01-27T00:47:49.498777+00:00 heroku[web.1]: Starting process with command `node yoi.js` | |
2014-01-27T00:47:50.408610+00:00 app[web.1]: Direct yaml files load via require() is deprecated! Use safeLoad() instead. | |
2014-01-27T00:47:51.940885+00:00 app[web.1]: | |
================================================================================ | |
2014-01-27T00:47:51.941120+00:00 app[web.1]: YOI v0.10.03 | |
2014-01-27T00:47:51.941120+00:00 app[web.1]: Easy (but powerful) NodeJS 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
{ | |
"PHP": { | |
"php": '/usr/bin/php', | |
"phpExtraPaths": [], | |
"phpConfigFile": 'php.ini' | |
}, | |
"JavaScript": { | |
"javascriptExtraPaths": [] | |
}, | |
"Perl": { |
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
<!-- Apple Full-Screen WebApp Options --> | |
<!-- Do NOT use width=device width because it will letterbox viewport. --> | |
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> | |
<!-- yes or not for fullscreen mode --> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<!-- Only if full screen is activate. Can be "default, black or black-translucent --> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black"> |
NewerOlder