var express = require('express');
var router = express.Router();

var ratings = [
  {text: 'Good UI! Many alert choices.', stars: 5},
  {text: 'Running Great! No crashes', stars: 5}
];

/* GET ratings listing. */
router.get('/', function(req, res, next) {
  res.json({
    ratings: ratings
  });
});

router.post('/', function(req, res, next) {
  ratings.push({
    text: req.body.text,
    stars: req.body.stars
  });
  res.sendStatus(201);
});

module.exports = router;

@@ -391,16 +391,25 @@
  stars: 
+parseInt(
 req.body
@@ -414,16 +414,17 @@
 dy.stars
+)
 %0A  %7D);%0A 
@@ -433,21 +433,51 @@
 es.s
-endS
 tatus
-(201
+Code = 201;%0A  res.json(%7Bsuccess: true%7D
 );%0A%7D

Fix rating route to return proper result and save stars as ints