With all the preparation from “Static pages” Section finished, we’re ready to get started developing the sample application. In this section, we’ll take a first step toward making dynamic pages by creating a set of actions and views containing only static HTML. We’ll be working mainly in the public/controllers and public/partials directories.
Generated static pages
To get started with static pages, we’ll first generate a controller using the same trainjs generate script we used in “The Users resource” Section to generate scaffolding.
Since we included the home and help actions, the public/app.js file already has a rule for each one.
In our case, this means that when we generate a home action inside the Static Pages controller we automatically get a page at the address /static_pages/home.