Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

..
Failed to load latest commit information.
templates
README.md
app.js
package.json

README.md

What is this example?

This examples demonstrate how to use locator-micro in an express application that relies on locator and express-view to render a page. It also demonstrate how to use a main layout for the page while relying on another micro template for the main area of the page (aka outlet).

How does it work?

There are two templates in this example, templates/bar.micro and templates/page.micro. They work together to form a composite view where bar will be inserted within a div in page's outlet entry.

But when the page gets executed on the browser, we can use a loader (e.g.: YUI Loader) to load a compiled version of bar on-demand, and call for render, producing a html fragment that can be inserted in the DOM.

How to test this app?

First, clone and install the component.

git clone https://github.com/yahoo/locator-micro.git
cd locator-micro
npm install

Second, install the example dependencies:

cd example
npm install

Third, run the express application:

node app.js

Then navigate to:

  • http://localhost:3000/
Something went wrong with that request. Please try again.