Created
June 21, 2017 15:33
-
-
Save mmetting/e94b226ca7b71453a878438b38f97f14 to your computer and use it in GitHub Desktop.
Add a timestamp to each entry being inserted
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var timestamp = new Date().getTime() | |
var options = { | |
"act": "create", | |
"type": "myFirstEntity", | |
"fields": { | |
"name": world, | |
"timestamp": timestamp | |
} | |
}; | |
$fh.db(options, function (err, data) { | |
if (err) { | |
console.error("Error " + err); | |
} else { | |
console.log(JSON.stringify(data)); | |
} | |
}); | |
res.json({ msg: 'Hello ' + world }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment