NodeJS Routing AJAX requests with Express JS
A simple implementation of AJAX
You should have the basic express-generator template
In app.js, add(you can add it anywhere after var app = express.app()):
Now in your index.js file (or its respective match), add:
Create an ajax.jade / ajax.pug or ajax.ejs file in /views directory, add:
Now, create a file in /public called magic.js
And there you have it! When you click Save the quote will change!