Handy JavaScript editor as Bluemix application

Sometimes, I want simple text editor on the web for developing JavaScript. This is to share the codes among multiple desktop (I’m using many PCs), and work with other developers (e.g. pair programming). I normally use IBM DevOps Services to do it. However, sometimes, I want very simple just for experiment. This is very similar situation where GitHub provides Code Snippet page to host very ad-hoc code snippet.

So I’ve tried Node version of Orion editor to run on Bluemix. This is not perfect solution for me because when the application stops, my editor contents will be gone. Eventually, code storage option may be developed to store files on Swift based object storage or Amazon S3. But for now, I experimented to see if my idea works or not.

First of all, I need source of Node version of Orion Editor.

$ npm install orion

The command installed orion node module inside node_modules. I have to edit source a bit so that it can be run on IBM Bluemix.

$ cd node_modules/orion
$ vi server.js

And I have modified port variable.

var port = process.env.PORT || args.port || args.p || 8081;

Then, I pushed this application to Bluemix.

$ cf push --random-route -c "node server.js"

As I imaged, I now have my own editor on the web as Bluemix application !

2015-01-14 12_07_33-my orion editor

Note: I have removed Bluemix application URL so that my codes are not copied somewhere. That’s why I used “–random-route” option in “cf push”. 🙂

I may explorer this solution more so that files created to be permanent. However, the priority is very low, since we have IBM DevOps services. This editor is just handy to fulfill my purpose to share code snippet with other PCs and other developers in remote location.

Advertisements
This entry was posted in Bluemix, JazzHub. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

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