Skip to content

ErikAndreas/pjax-ractivejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pjax-ractivejs

Isomorphic javascript, PJAX with Ractive.js.

Using javascript on client and server sharing libs and templates the natural format is CommonJS (because Node.js) and thereby Browserify on the client.

This is a least viable client - server setup using pushState + Ajax; PJAX, with javascript all the way and with full template re-use using Ractive.js (kinda like Handlebars templating). ##Notes

  • Server side rendering of all route accessible pages/views
  • Twitter does something similar
  • Borrowed a lot from PJAX-Standalone
  • Doesn't return rendered html on XHR requests (like PJAX-Standalone), but json data (like Twitter) + parsed Ractive template (parsed tpl is valid json!)
  • Express.js template rendering using ractive-render

##Run it

$ npm install
$ node server.js

Browse to http://localhost:3000/index. If/when you've made changes to index.js or pjax-ractive.js you should run $ npm run build-js to generate new bundle.js

About

Isomorphic javascript PJAX with Ractive.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published