Home > OP4JS > Smart Mobile Studio + nodeJS + Raspberry PI = awsome

Smart Mobile Studio + nodeJS + Raspberry PI = awsome

January 17, 2014 Leave a comment Go to comments
Smal but very fun to play with

Smal but very fun to play with

Want to test out your nodeJS business app before renting an expensive server + database hosting solution?

Well here is how you could do it with a minimalistic budget. First, order a Raspberry PI credit-card-sized computer at a whopping $25 pricetag. Follow the Raspberry PI installation guide for Linux (very simple, just download and flash the rom-card, then reboot and select the OS you want), then follow the Raspberry PI guide to setting up nodeJS on it.

So how do I code this device?

Buy Smart Mobile Studio, write your nodeJS server and Client in ordinary Object Pascal (or more precise: Smart Pascal, which is a next generation object pascal). To get your product onto the Raspberry PI, login to the device and start X (the “windows” like desktop environment) – copy the compiled nodeJS server code from your windows machine (you can access normal windows shares via the Linux filemanager).

Then open a shell (root user) and make sure read/write/execute rights is available for all users on your project folder. In short: cd to the parent folder, then type “chmod [myfolder] 7777”, replacing [myfolder] naturally with your project folder.

Then start your nodeJS project as normal on the raspberry.

Conclusion

Voila — you have a pocket size nodeJS server to test and play with. As a bonus you can also install freepascal on it (“sudo apt-get install lazarus” should do the trick). Lazarus is very slow on this device, so i suggest you write your programs on windows and just compile with FPC on the PI – which has an ARM CPU by the way).

Here is how you setup nodeJS on your machine: http://blog.rueedlinger.ch/2013/03/raspberry-pi-and-nodejs-basic-setup/

Follow the Smart Mobile Studio tutorial for creating nodeJS projects – both client and server.

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: