solidusjs / solidus

A simple server that generates pages from JSON and Templates
MIT License
28 stars 7 forks source link

Provide url data in context #87

Closed Fauntleroy closed 10 years ago

Fauntleroy commented 10 years ago

Provides a url object in the page context with the following data:

"url": {
    "host": "localhost:8080",
    "port": "8080",
    "hostname": "localhost",
    "hash": null,
    "search": "?releases=new,old&terms=good,bad,ugly",
    "query": {
      "releases": "new,old",
      "terms": "good,bad,ugly"
    },
    "pathname": "/page/5.json",
    "path": "/page/5.json?releases=new,old&terms=good,bad,ugly",
    "href": "http://localhost:8080/page/5.json?releases=new,old&terms=good,bad,ugly",
    "origin": "http//localhost:8080"
  }