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
<form action='/post' method="post"> | |
<label for="POST-name">Post Name:</label> | |
<input id="POST-name" type="text" name="name"> | |
<input id='POST-filename-upload' type='file' multiple='multiple'> | |
<input type="submit" value="Save"> | |
</form> |
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
var formidable = require('formidable'); | |
//Listen for post request, then... | |
var form = new formidable.IncomingForm(); | |
form.uploadDir = '/tmp'; | |
form | |
.on('error', function(err) { | |
log('form error'); | |
}) | |
.on('field', function(field, value) { | |
log(field,value); |
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
var timestamp=(function(){return (new Date()).getTime()})(); | |
var log=function(data){console.log('Servant : '+data+' : '+timestamp);}; | |
//var cap=function(string){string=(string).toString();return string.charAt(0).toUpperCase()+string.slice(1);}; | |
log('Activated'); | |
var http = require('http') | |
, fs = require('fs') | |
, ugly = require('uglify-js') | |
, mime = require('mime') | |
, formidable = require('formidable') |
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
{ | |
"name": "harbhub", | |
"domain": "harbhub.com", | |
"subdomain": "harbhubssl", | |
"scripts": { | |
"start": "server.js" | |
}, | |
"version": "0.0.0-21", | |
"engines": { | |
"node": "0.8.x" |
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
C:\Users\mike\testjitsu>jitsu deploy --debug | |
info: Welcome to Nodejitsu harbhub | |
info: jitsu v0.11.7, node v0.8.14 | |
info: It worked if it ends with Nodejitsu ok | |
info: Executing command deploy | |
info: Analyzing application dependencies in server.js | |
debug: { method: 'GET', | |
debug: uri: 'https://api.nodejitsu.com/apps/harbhub/harbhub', | |
debug: headers: | |
debug: { Authorization: '*********************************', |
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
C:\Users\mike\testjitsu>jitsu deploy | |
info: Welcome to Nodejitsu harbhub | |
info: jitsu v0.11.7, node v0.8.14 | |
info: It worked if it ends with Nodejitsu ok | |
info: Executing command deploy | |
info: Analyzing application dependencies in server.js | |
warn: Local package version appears to be old | |
warn: The package.json version will be incremented automatically | |
warn: About to write C:\Users\mike\testjitsu\package.json | |
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
if (x === 1) { | |
if (y ===1) { | |
z=1; | |
} else {z=2} | |
} |
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
Michaels-MacBook-Pro:harbhub harbhub$ mongo | |
MongoDB shell version: 2.0.6 | |
connecting to: test | |
> |
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
CLIENT SIDE | |
$(document).ready(function () { | |
var myData = $('#myInput').val(); | |
$.ajax({ | |
url: 'http://localhost:8888/what', | |
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
Michaels-MacBook-Pro:harbhub harbhub$ jitsu deploy | |
info: Welcome to Nodejitsu harbhub | |
info: It worked if it ends with Nodejitsu ok | |
info: Executing command deploy | |
info: Analyzing your application dependencies in node app.js | |
info: Checking app availability harbhub.com | |
info: Creating app harbhub.com | |
info: Creating snapshot 0.0.1 | |
error: Error running command deploy | |
error: Nodejitsu Error (500): Internal Server Error |