NodeFu-1.jpgHave you been itching to try out Node.JS for a real-time communication app? Perhaps a voice application? Or a SMS or IM agent? Or a Twitter-bot? Did you read about our Node.js library for the Tropo Web API released back in October and think “That would be a cool way to learn Node.js!” But have been put off by not having a server on the Internet where you could run your Node.JS apps?

You don’t have to wait any longer… our own Chris Matthieu of Voxeo Labs today launched a project he’s been working on in his spare time called “NodeFu that offers free hosting of Node.JS applications at:

http://nodefu.com

The beautiful thing is that NodeFu is an excellent platform to build Tropo apps that interact with users via voice, SMS, IM or Twitter.

How to Get Started with NodeFu

First, take a look at the NodeFu home page where the process is documented. You request an invite via a curl command from the command line:

curl -X POST -d "email=your_address@example.com" http://nodefu.com/coupon

You will get an invite with a link to register a new NodeFu account. After that, all your interaction with your application occurs through curl and git.

You start out by registering a new NodeFu application using another command-line curl command:

curl -X POST -u "testuser:123" -d "appname=myapp&start=hello.js" http://api.nodefu.com/app

Assuming your chosen “appname” is available, NodeFu will send back a bit of JSON that includes the port number your app will run on and the name of the git repo you will push to. (If your appname is not available you will see that in the JSON and will have to try again with a new appname.) As each NodeFu application runs on a different port, you will now need to edit your Node.js code to have your server run on this provided port number.

When you are ready to deploy your code to NodeFu, you then just do two git commands:

git remote add nodefu the_url_returned_by_our_api
git push nodefu master

Your NodeFu app will be live at http://appname.nodefu.com. As you work on your app, you just do more commits to your local git repo and then do

git push nodefu master

when you want to update the live app. Once you push to NodeFu, your app should automatically be updated.

If you are building your Node.js app with the tropo-webapi-node library, which is perhaps the easiest way to get started, you should be able to go to your “http://appname.nodefu.com/” URL and see the JSON that will be sent to Tropo.

Setting Up The Tropo Side

To connect your NodeFu app to the communication services, you need to login to your Tropo account (or create a new free account if you don’t have one). Once logged in, you’ll go to “Your Applications” and click on “Create New Application” and then click the big button above “Tropo WebAPI”, as shown in this image:

tropoaddapp.jpg

Next you’ll enter a name, which only shows up in your list of Tropo apps, so you can use whatever name will help you remember what the app is. Then you will enter the “http://appname.nodefu.com/” URL that corresponds to your app.

tropoappinfo.jpg

After you click the big “Create Application” button, your app is basically ready to go! You’ll see a list of phone numbers come up and you can get started right away calling into the app via Skype or from a SIP softphone. If you want to add a phone number, you just click the link on the right side and add one (or more) of the available phone numbers. You can also use the section under “Instant Messaging Networks” to connect your app to Jabber, AIM, GoogleTalk, MSN or Yahoo!Messenger IM accounts… or to connect your app to a Twitter account:

tropocontactmethods.jpg

Phone numbers are provided for free to developers in a range of states and countries around the world:

tropophonenumbers.jpg

That’s it! Now you can get started calling, SMS’ing, IM’ing or tweeting into your Node.js app hosted over at NodeFu!

You can try out the application above by calling or messaging one of the following numbers or addresses:

Voice & SMS Messaging: 1-860-578-2022
Skype Voice: 990009369991478873
SIP Voice: sip:9991478873@sip.tropo.com
INum Voice: 883510001827349
Jabber/GoogleTalk: nodefuhello@tropo.im

Tropo is providing the voice and SMS connectivity and then communicating with my app running over on NodeFu.com.

Kudos to Chris on the launch of NodeFu and we’re definitely looking forward to seeing what you all build with Tropo and Node.js!


P.S. Note that the process under “Setting Up The Tropo Side” is NOT specific to NodeFu – it’s the same process you would use for any application hosted externally and using the Tropo WebAPI. It could be any of the other Node.js hosting providers, or it could be a hosting provider for any other language out there. The only difference is going to be the URL that you provide as part of the application creation process.


Originally from Voxeo Blogs<