This is a little proof of concept project to verify if a KeystoneJS application can work as a SPA using Backbone/Marionette.
The key difference is that the Keystone routes are set up as API routes, directly returning the model data from the MongoDB, instead of using static Keystone views. Backbone can then retrieve the data from those API endpoints and render the views.
The main advantage is that we still have a full admin application with user/permission management and still can create a fantastic, marvelous and blazingly fast SPA using Backbone/Marionette.
JSPM/SystemJS is used as a client-side module loader but could be exchanged for anything else.
The code was generated by the Keystone Yeoman generator and then adapted to show the blog posts configured by the admin app and stored in the MongoDB as Backbone application.
- Install and start MongoDB
npm install jspm -g
npm install
jspm install
node keystone
- Now you can access the admin application and create some blog posts
- Go to
localhost:3000/keystone/signin
and sign in withadmin
/admin
- Create some posts
- The blog posts should be shown on
localhost:3000/