Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
krazyjakee authored and rawpixel-vincent committed Jul 17, 2021
1 parent c028046 commit b5ed1fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion express/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ app.use(bodyParser.json());
/* ======== home ======== */

function handle_timestamp(req, res) {
res.set({ "Content-Type": "text/json" });
res.set({ "Content-Type": "application/json" });
var timestamp = { timestamp: moment().unix() };
return res.json(timestamp);
}
Expand Down
2 changes: 2 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ class ExpressRedisCache extends EventEmitter {
if (this.client.on) {
this.client.on("error", error => {
console.error(error);
this.connected = false;
this.emit('message', 'Redis is unavailable or not running');
});

this.client.on("connect", () => {
Expand Down

0 comments on commit b5ed1fc

Please sign in to comment.