Project Plan for the year.

 Ideas, thoughts and musings, Uncategorized  Comments Off on Project Plan for the year.
Jan 282012
 

So it’s a new year and this post is largely a base of reference for myself to look over as the year progresses.

Coding Soundtracks

So I registered the domain codingsoundtracks.com and plan to and have been building a fairly simple website allowing coders to add their favourite coding soundtracks for other coders to find.
It is currently live at coding soundtracks

Rebuild Eventzin.com

Eventzin was a previous project which while it never quite took off on its first iteration does offer potential for being a useful tool. Basically it is a simple way to set up events with your friends, even friends that aren’t on eventzin. This will be rebuilt with node and also js css html5 mobile apps, probably using either sencha touch or the new jqmobi.

Walking Companion

Walking companion is personal project which will be a native iOS app doing something which has already been done, but something which I want to have an experiment with. It will be an app to keep track of your walks, how far your walk each week, how many calories you burn etc.

Kids Game on the Ipad

Having a 3yr old has told me that parents with iPads buy quite a lot of apps. The iPad is a brilliant device for children. The interface is perfect for a child’s hands on interaction. All of this has made me want to do a kids game. More on this later.

Helpfinding.me

This is an attempt to try harness the connected networks we have created and use them to help find missing people. Again this would likely be build in node js and then cross platform mobile app.

Dublinks

This is a business project. I bought this site at the end of last year and while it is paying for itself, it needs some investment of time and effort on my part to bring it to a better place and improve the revenue flow from it.

Nomad

Finally, but not least, Nomad is a novel that I am writing. I hope to have a reasonable draft of this completed by the end of the year.

So that’s it. A busy year ahead as I have also just started a new job with start up company Feedhenry.

Running Multiple Apps on Same port Nodejs

 Development, general, node.js  Comments Off on Running Multiple Apps on Same port Nodejs
Jan 072012
 

This is actually surprisingly simple due to great work done by nodejitsu and also by the connect team. And I have largely copied the content from the links at the bottom of the page:

So with http proxy you can use it as follows:


npm install http-proxy

-- app.js ---

var http = require('http'),
httpProxy = require('http-proxy');
//
// Create your proxy server
//
var options = {
hostnameOnly: true,
router: {
'foo.com': '127.0.0.1:8001',
'bar.com': '127.0.0.1:8002'
}
}
httpProxy.createServer(options).listen(80);

in terminal run
nohup nodemon app.js & //will keep it running

-- foo.js --

var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.write('request successfully proxied 8001!' + '\n' + JSON.stringify(req.headers, true, 2));
res.end();
}).listen(8001);

in terminal run nodemon foo.js
-- bar.js --

var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.write('request successfully proxied 8001!' + '\n' + JSON.stringify(req.headers, true, 2));
res.end();
}).listen(8002);

in terminal run nodemon bar.js

finally edit your /private/etc/hosts file and add:

127.0.0.1 foo.com
127.0.0.1 bar.com

browse to bar.com and foo.com to see that both apps are running.

more info here
nodejitsu http proxy

The vhosts from connect is also really nice:
you can see a really good example of this in action here:

vhosts example

© 2012 Craig Brookes Suffusion theme by Sayontan Sinha