Comparing version 0.0.1-7 to 0.0.1-8
17
app.js
@@ -7,3 +7,4 @@ | ||
var express = require('express') | ||
, routes = require('./routes'); | ||
, routes = require('./routes') | ||
, fizzbuzz = require ('./lib/fizzbuzz').fizzbuzz; | ||
@@ -37,15 +38,5 @@ var app = module.exports = express.createServer(); | ||
app.get('/:var', function(req, res){ | ||
var num; | ||
num = req.params.var; | ||
var num = req.params.var; | ||
res.send(num+' -> '+fizzbuzz(num)); | ||
if( num % 3 !== 0 && num % 5 !== 0 ){ | ||
res.send(num+" -> "+req.params.var) | ||
}else if( num % 3 === 0 && num % 5 !== 0 ){ | ||
res.send(num+" -> "+"fizz") | ||
} else if(num % 3 !== 0 && num % 5 === 0 ){ | ||
res.send(num+" -> "+"buzz") | ||
} else{ //num % 3 === 0 && num % 5 === 0 | ||
res.send(num+" -> "+"fizzbuzz") | ||
} | ||
}); | ||
@@ -52,0 +43,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"name": "fizzbuzz", | ||
"version": "0.0.1-7", | ||
"version": "0.0.1-8", | ||
"homepage": "https://github.com/blakmatrix/fizzbuzz", | ||
@@ -8,0 +8,0 @@ "main": "./lib/main", |
@@ -20,5 +20,9 @@ FizzBuzz: the Programmer's Stairway to Heaven | ||
Demo: [fizzbuzz.jit.su](http://fizzbuzz.jit.su/) | ||
Run **server**: `node app.js` | ||
Run your own **server**: | ||
git clone git@github.com:blakmatrix/fizzbuzz.git && cd fizzbuzz | ||
node app.js | ||
Use it in your own app with **require**: | ||
@@ -25,0 +29,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
43
305653
6806