Editor’s Note: Cloud9 IDE is no longer on our list of supported platforms. For a current list of supported platforms, visit:
In this post I am going to show you how to get StrongLoop up and running quickly in a Cloud9 workspace so you can explore some of the features of LoopBack and StrongOps without having to do a lot of configuration.
What is Cloud9?
Cloud9 is a cloud based IDE which allows you to edit code in the browser. One of the cool things about it is that you can share your development workspaces publicly or keep them private. But most importantly, you don’t have maintain anything locally. With a development environment in the cloud, as long as you have a browser and an internet connection, you can access your workspace exactly as you left it in your previous session. You can learn more about Cloud9 on their features page.
Ok, let’s get started…
Note: If you already a C9 user and need to upgrade your StrongLoop installation, check out the upgrade instructions here.
Step 1: Register for an account
First things first: head on over to strongloop.com and click on the “Login” menu item in the upper right hand corner of your browser and select “Register.” Type in your email address and run through the email verification process as directed.
Step 2: Getting started
After completing your profile you’ll be redirected to the Get Started page. On this page you are going to be presented with a variety of different deployment options. Besides the ability to install StrongLoop locally via npm, you can also choose from a variety of supported clouds including Amazon, Heroku, OpenShift, Rackspace and Cloud Foundry. For the purposes of this blog, we are going to chose “Cloud 9 IDE Workspace.”
Expand out the “Cloud9 IDE Workspace” entry and click on the “Get Started” link. This will take you to the appropriate section in the docs that spells out how to work with StrongLoop on Cloud9.
Step 3: Launch a Cloud9 workspace
Launch your workspace by clicking on the “Launch your Cloud9 workspace” link. It might take about a minute for the workspace to initialize and load, so please be patient. There’s no need to log in, your StrongLoop credentials are being used to spin up the workspace. When the workspace is finished loading, you should see your directory explorer prepopulated with StrongLoop and the sample application files.
Step 4: Run the LoopBack sample application
What’s LoopBack? It’s a an open source backend for mobile apps that’s built on Node already installed on your workspace. It has some cool features like making it easy to connect to data sources both in the cloud and in the data center, like Oracle, MySQL and MongoDB. Plus, it has an iOS and Android SDK to make it easy to program against.
To run the LoopBack sample application just click on the green “Run” button in the toolbar. You’ll see a bunch of output in the window at the bottom of the IDE and eventually a browser pane will pop-up on the right-hand side. This is the API browser for the sample LoopBack application. If you click on the various “GET” buttons you can see requests coming back via the application’s REST API.
For additional information on how to work with the sample application, you can scroll down to the bottom of the browser pane and follow the next steps listed there.
Step 5: Configure StrongOps
Next, let’s configure a StrongOps dashboard that we can use to monitor our LoopBack sample app. What’s StrongOps? It’s a dashboard for your Node apps that gives you both operational capabilities, like managing clusters, and deep performance monitoring metrics including EventLoop stats and debugging hooks.
Let’s stop the sample application by clicking on the red “stop” button in the toolbar.
At the bottom of the IDE, change focus from the the “Output” tab to the “Terminal” tab. We’ll need to execute a few commands to configure the StrongOps agent to monitor the LoopBack sample app that got initialized in Step 4. So, let’s get to it…
Now, let’s install the StrongLoop command line interface. (Please be patient, it takes a few minutes to pull all the npm packages!)
$ npm install strong-cli
Next, verify your install:
$ slc version
In my case, I see:
slc v2.0.4 (node v0.10.22)
Now, let’s register the StrongOp agent:
$ slc strongops --register
Work through the interactive prompts and make sure to specify the same email and password you used when you registered on strongloop.com in Step 1.
After registering your agent, you should be able to view your dashboard by going to to strongloop.com and clicking on the “Login” menu item in the upper right hand corner of your browser. At this point you should login if you weren’t already.
Select the “StrongOps” menu option.
You can directly go to your dashboard by using this link:
You won’t see any data in the dashboard until the application has been running for a few minutes. So, let’s make sure to restart our sample app by clicking the green “Run” button in the Cloud9 toolbar.
Click the “GET” buttons in the sample app a few times to simulate a few requests within the app.
Return to the StrongOps dashboard to view the metrics being populated by clicking on the “Dashboard” tab along the top menu. Make sure to select all the different performance views:
You should now see some data trickling in based on your previous activity. For example, here’s the “Slowest Endpoints and Databases” view:
At this point you should have the StrongLoop cli, StrongOps, LoopBack and a sample application running in the Cloud9 workspace. Cool thing is you can close out your workspace and come back to it in the state you left it. Next steps depend on what you want to explore.
- If it’s LoopBack, the documentation and get started guide is here.
- If it’s StrongOps you are interested in, follow the same steps to get the StrongOps agent installed on your own application. The documentation and get started guide is here.
- If you’d like to learn more about pricing or support options, view the subscription plans page.
- Questions? Ask your question in our Google Group or ping us at [email protected].