Skip to content

Instantly share code, notes, and snippets.

@devjin0617
Created January 4, 2017 12:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devjin0617/2298fa27d0d4dfaea8a2a1443cb29c1a to your computer and use it in GitHub Desktop.
Save devjin0617/2298fa27d0d4dfaea8a2a1443cb29c1a to your computer and use it in GitHub Desktop.
var Realm = require('../lib/realm.js');
router.post('/', (req, res) => {
var name = req.body.name;
var email = req.body.email;
var tel = req.body.tel;
Realm.UserRealm.write( () => {
Realm.UserRealm.create('User', {
name : name,
email : email,
tel : tel,
date : new Date()
});
});
res.send({
success : true
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment