# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-listen_port = process.env.app_port ? 9988
+listen_port = process.env.PORT ? process.env.app_port ? 9988
sys = require 'sys'
fs = require 'fs'
http = require 'http'
else if rel_path.substr(rel_path.length - 3) is '.js'
res.writeHead 200, 'Content-Type': 'text/javascript'
return js_handler url_parts.query, res, req, url_parts
- else if rel_path.substr(rel_path.length - 4) is '/set'
+ else if rel_path is 'set'
data = ''
req.on 'data', (chunk) ->
data += chunk
query[key] = parg
return set_handler query, res, req, url_parts
return
- else if rel_path.substr(rel_path.length - 4) is '/get'
+ else if rel_path is 'get'
return get_handler url_parts.query, res, req, url_parts
else if rel_path.substr(rel_path.length - 4) is '.ico'
res.writeHead 404