Quantcast
Channel: git – Platform as a Service Magazine
Viewing all articles
Browse latest Browse all 24

Add Nodetime to Your Node.js App in No Time

$
0
0
Author: 
Image Upload: 
OpenShift Nodetime Console screenshot
OpenShift Nodetime Welcome Screen Picture
Nodetime Logo

Nodetime Logo
OpenShift is a PaaS from RedHat. It supports multiple languages and frameworks, and allows defining your own types of instances called cartridges, which makes the platform very powerful and suitable for provisioning full stack applications. Available as public, private and hybrid cloud, OpenShift is a an attractive open source, no lock-in platform for enterprises as well as startups.

Node.js is supported out of the box. To profile, monitor, analyze and optimize the performance and capacity of Node.js applications on OpenShift, Nodetime can be added to Node apps by just including nodetime package in packages.json file and adding the initialization code to the app’s main script. See the documentation for details.

Get Started

To get started with Nodetime even faster OpenShift offers Quickstart applications, which showcase a working setup of an add-on. Nodetime’s Quickstart can be found in this git repo: https://github.com/openshift/nodetime-openshift-quickstart.

Create an account at http://openshift.redhat.com/and set up you local machine with the client tools.
Create a node-0.6 application (you can call your application whatever you want) and change into the application directory.

   
   rhc app create nodetime nodejs-0.6 --from-code https://github.com/openshift/nodetime-openshift-quickstart 
   cd nodetime 

Configuration

Configure server.js file with your information:

  require(nodetime).profile({
    accountKey: my_account_key,
    appName: My OpenShift Node.js App;
  });

accountKey- You can find your account key on the https://nodetime.com/account page.appName- The name under which your application’s web console will be available in your Nodetime account.

For advanced configuration options please see API documentation athttp://docs.nodetime.com/#agent-api.

Then push the repo

  git add .
  git commit -m "my first commmit"
  git push

That’s it, you can now checkout your application at:

  http://nodetime-$yournamespace.rhcloud.com

If the provisioning of the quickstart application was successful, the following page will be displayed

OpenShift Nodetime Welcome Screen Picture

Web Console

Visit Nodetime’s web console from https://nodetime.com/apps page, where you will be able to find the application by the name you’ve used for configuring Nodetime’s agent. To make sure the agent is properly configured, please go to the Transaction Profiler and then reload the app at: http://nodetime-$yournamespace.rhcloud.com. You should be able to see the samples of the requests you just initiated. Here is what it will look like:

OpenShift Nodetime Console screenshot

Information about slowest transactions and other metrics will be shown in the web console over time.

For the full feature list and more details about the Nodetime service please visit the documentation pages at: http://docs.nodetime.comor contact our Support Team at: http://support.nodetime.com.

The post Add Nodetime to Your Node.js App in No Time appeared first on Platform as a Service Magazine.


Viewing all articles
Browse latest Browse all 24

Trending Articles