Showing posts with label pogoplug. Show all posts
Showing posts with label pogoplug. Show all posts

Thursday, January 31, 2013

Using Nodejs as a fileserver


Creating a Simple Fileserver.
Tip #2
I wanted a simple fileserver, I tried looking for a variety of search terms, but finally came upon simple file server. I came across the post linked by Tip #2 above, but it wasn't exactly clear what it was doing exactly.

The documentation isn't 100% clear so I played with it a little, (and added some comments to one of the posters).

I used connect.

Install it with npm connect.

Next use the following code:

var connect = require('connect'),
    http = require('http');
connect()
    .use(connect.static('pathyouwishtoserve'))
    .use(connect.directory('pathyouwishtoserve'))
    .listen(8080);
.use(connect.static('pathyouwishtoserve')) tells the server where to look for files.
.use(connect.directory('pathyouwishtoserve')) tells the server to return the following directories contents.

If you now navigate to http://your-ip-address:3000 you'll get a list of the directory contents,
if you add a /filename to that path you'll get the file.


I'll be posting tips as I come across them of using NodeJS as an intranet fileserver.
Long story short, I want to build a Roku app that will refer to the NodeJS server for where to find the files. I figure it'll be simpler than PLEX, and also faster (I'm hoping). Once I get the stuff running I'll plan on running it on my Pogo Plug as a media server for my Roku, totally awesome!

Friday, December 28, 2012

How to quickly build amazon affiliate links on an android device.

Mobile
I was attempting to build an amazon affiliate link on my phone for a pogoplug I bought the other day. I found it to be quite cumbersome. I knew there had to be an easier way!


Social
Additionally the links coming from amazon are long, and don't post well to social networks (read Twitter). I thought there had to be a better way, i searched the android market but just couldn't find anything that easy.

The App
So I wrote an android app to do it.
This app makes creating links trivial. I wanted the interface to be as simple as possible. There are only 4 buttons (possibly a 5th someday) from left to right, copy, share, help, settings).

Download Amazon Affiliates Link Generator.

How
Simply visit the amazon page from your Android, click share, select the Amazon Affiliates Link Generator. It will open up the app and allow you to reshare or copy the link.
Easy as pie!

Ads
This app has no ads.


Check out my other apps as well as Amazon Affiliate Link Generator