Con$nuous	  Co?	   V	  Javascriptu?     Ladislav	  Prskavec
ToDo App
module = angular.module(todoApp, [])# Controller TodoCtlmodule.controller TodoCtrl, ($scope, $http) ->  $scope.todos = [];...
Mongo DB
<?phprequire_once __DIR__ ./config.php;header(Content-type: application/json);$url = "https://api.mongohq.com/databases/mo...
PhantomJSheadless browser
ContinuesIntegration
Compile, Lint
Code Coverage
Documentation
JenkinsCI
JasmineJSCoverageJSDoc
Ladislav	  Prskavec  h9p://blog.prskavec.net         @abtrishttps://github.com/abtris/angular-todo-mongohq
Flickr credits•   123646856      •   5462861556•   212999782      •   5474897335•   3212942388     •   6315847523•   40907...
Javascript Continues Integration in Jenkins with AngularJS
Javascript Continues Integration in Jenkins with AngularJS
Upcoming SlideShare
Loading in …5
×

Javascript Continues Integration in Jenkins with AngularJS

5,507 views
5,357 views

Published on

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
5,507
On SlideShare
0
From Embeds
0
Number of Embeds
1,070
Actions
Shares
0
Downloads
41
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Javascript Continues Integration in Jenkins with AngularJS

  1. 1. Con$nuous  Co?   V  Javascriptu? Ladislav  Prskavec
  2. 2. ToDo App
  3. 3. module = angular.module(todoApp, [])# Controller TodoCtlmodule.controller TodoCtrl, ($scope, $http) -> $scope.todos = []; # Proxy to MongoHQ $scope.url = "proxy.php" # Get all todos from mongodb AngularJS $scope.getAll = -> $http.get($scope.url).success($scope.getCallback) return $scope.getCallback = (data, status, headers, config) -> $scope.todos = data return # Add new todo $scope.addTodo = -> id = new Date().getTime() $scope.data = {"document" : {"_id": " + id + " , ... todo = {text:$scope.todoText, done:false} $scope.todos.push(todo) $http.post($scope.url, $scope.data).success($scope.sucessCall) return
  4. 4. Mongo DB
  5. 5. <?phprequire_once __DIR__ ./config.php;header(Content-type: application/json);$url = "https://api.mongohq.com/databases/mongo/collections/todo/documents?_apikey=" . MONGOHQ_API_KEY;$postData = file_get_contents("php://input");if (!empty($postData)) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_POST ,1); curl_setopt($ch, CURLOPT_HTTPHEADER, array(Content-type:application/json)); curl_setopt($ch, CURLOPT_POSTFIELDS , $postData); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION ,1); curl_setopt($ch, CURLOPT_HEADER , 1); echo curl_exec($ch);} else { echo file_get_contents($url);} Integration MongoHQ
  6. 6. PhantomJSheadless browser
  7. 7. ContinuesIntegration
  8. 8. Compile, Lint
  9. 9. Code Coverage
  10. 10. Documentation
  11. 11. JenkinsCI
  12. 12. JasmineJSCoverageJSDoc
  13. 13. Ladislav  Prskavec h9p://blog.prskavec.net @abtrishttps://github.com/abtris/angular-todo-mongohq
  14. 14. Flickr credits• 123646856 • 5462861556• 212999782 • 5474897335• 3212942388 • 6315847523• 4090782772 • 6711727919• 4489747597• 4572739839

×