7. NOW WHAT?
• PACKAGE.JSON for any extra
node modules you might want.
• KEYSTONE.JS for config options
• Routing in ROUTES/VIEWS/
INDEX.JS
• Models in MODELS/
• Views in TEMPLATES/VIEWS/
• Controllers in ROUTES/VIEWS/
• Front End Resources in PUBLIC/
8. PACKAGE.JSON
• Manages dependencies in
node
• Anything in npmjs.org can
be referenced here
• NPM INSTALL will
retrieve dependencies
and install them to
NODE_MODULES
• Never commit
NODE_MODULES
9. KEYSTONE.JS
• Main config and boot file
• Email
• Routes
• Local Variables
• Emailing Rules
• Nav Elements in Admin
• Custom templating
engines can be used
• Here’s where you set your
database up as well
10. ROUTING
• ExpressJS style routing,
hence familiar syntax
!
• Error pages can be
defined
!
• Most anything you can
do in Laravel, you can
do here.
12. MODELS
• Created as a keystone.List
• .add method enables you
to add keys to the model
• Changes to models are
incorporated in to the
database on restart
• Config options for which
columns to show in admin
Types: Boolean, Text, Textarea, Email, Url, Html, Color, Date, Datetime, Key,
Number, Money, Select, Markdown, Name, Password, Location, CloudinaryImage,
CloudinaryImages, LocalFile, S3 File, Embedly
13. VIEWS
• Any tempting
language you want,
just set it up in
keystone.js
• Data is passed by
setting it the
controller as a
locals parameter on
the response.
14. CONTROLLERS
• Contain all the logic from the
request to the view being
rendered.
• Parameters passed to the view
through the response
argument of keystone.View
• External files can be included
and external functionality used
• Views are rendered with
the .render function
• Additional parameters can be
passed in to render