Advertisement
Guest User

Untitled

a guest
Oct 12th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. app.get('/year', function(req, res) {
  2. res.send({year: 1984});
  3. });
  4.  
  5. this.getRequest = function() {$.get('/year', updateDOM)};
  6.  
  7. // back
  8. app.get('/year', function(req, res) {
  9. res.send(JSON.stringify({year: 1984}));
  10. });
  11.  
  12. // front
  13. this.getRequest = function() {$.get('/year', JSON.parse(updateDOM))};
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement