Coder Social home page Coder Social logo

ajay-sagittaire / fibserver Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lucrussell/fibserver

0.0 1.0 0.0 3.79 MB

REST web service for fibonacci, demonstrating Pivotal Cloud Foundry, Spring Boot and AngularJS

JavaScript 27.58% Java 49.21% HTML 22.22% CSS 0.98%

fibserver's Introduction

README for fibserver

See the wiki for background on this project.

Introduction

fibserver is a simple REST server implemented with Spring, for calculating fibonacci sequences. It also comes with an AngularJS front end to demonstrate calling the REST server. It's all glued together with JHipster, which provides monitoring and maintenance screens and other features.

These technologies were chosen specifically for their focus on extensibility and maintainability in a production environment, the key requirement of the project. To learn more about the technology choices, please see Technology Choices.

Support Documentation

The front end for the application looks like this: alt text Type a number between 0 and 200 in the input to print out a fibonacci sequence.

How To See Health Checks

An authenticated user can see health checks for a running instance of the server. alt text

How To Test API Methods

Authenticated users can test calls to the REST services: alt text

How To Check Metrics

An authenticated user can view metrics for a running instance of the server. alt text

This will also show number of server errors per HTTP request.

How to Obtain Timings for a Web Service Call

It may be useful to check the performance statistics for services in production. Authenticated users can check service time in milliseconds for getFibonacciSequence on the Metrics page, Services Statistics section.

alt text

How To Manage the Application on Cloud Foundry

The application is deployed to the EMC Pivotal Cloud Foundry where it can be managed, e.g.

  • View the logs
  • Scale the application by adjusting number of instances
  • Adjust memory available to the instances

alt text

Developer Documentation

Install Prerequisites

These instructions apply to OSX 10.8.2.

  1. Install Java from the Oracle website.
  2. Install Maven
  3. Install Git if not already installed
  4. Install Node.js from https://nodejs.org/
  5. Install Yeoman: sudo npm install -g yo
  6. Install Bower: sudo npm install -g bower
  7. Install Grunt: sudo npm install -g grunt-cli
  8. Install JHipster: sudo npm install -g generator-jhipster

How to Build the Application

  1. Check out the project : git clone https://github.com/lucrussell/fibserver
  2. Run mvn spring-boot:run (or run src/main/java/com/mycompany/myapp/Application.java in your IDE)
  3. Browse to http://localhost:8080

How To Deploy to Cloud Foundry

  1. Create an account on Pivotal Cloud Foundry
  2. Install the cf CLI here
  3. Run yo jhipster:cloudfoundry

Development Notes

Here are a few key parts of the application:

How To Run The Tests

You can run mvn:test on the command line, or run all the tests under src/main/test in your IDE.

Troubleshooting

Grunt tests might fail. Ensure they can run by setting up PHANTOMJS_BIN env var, see here.

fibserver's People

Contributors

lucrussell avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.