Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: unikraft/catalog
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 268c2d3f21a5befc5c8d72374bc8889739cebb8e
Choose a base ref
..
head repository: unikraft/catalog
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8369efa177cd674a7646c0395bf330b3571a7cc1
Choose a head ref
Showing with 6 additions and 1 deletion.
  1. +6 −1 examples/nginx-nodejs-redis/web/server.js
7 changes: 6 additions & 1 deletion examples/nginx-nodejs-redis/web/server.js
Original file line number Diff line number Diff line change
@@ -9,7 +9,12 @@ const redisClient = redis.createClient({

app.get('/', function (req, res) {
redisClient.get('numVisits', function (err, numVisits) {
numVisitsToDisplay = parseInt(numVisits) + 1
if (err) {
console.log(err)
res.send('An error occurred')
return
}
var numVisitsToDisplay = parseInt(numVisits) + 1
if (isNaN(numVisitsToDisplay)) {
numVisitsToDisplay = 1
}