solidusjs / solidus

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

Current environment should be included in context #33

Closed pushred closed 11 years ago

pushred commented 11 years ago

It would be helpful to include the name of the current environment in the context for all templates for toggling between code to be used in dev (i.e. livereload, alternate account ID's, etc) vs. production. In order for straightforward use in Handlebars I recommend boolean flags for development and production, for use like so:

{{# development }}
    <script src="http://localhost:35729/livereload.js"></script>
{{/ development }}
pushred commented 11 years ago

I copied over this version of Solidus to the site I'm working on but I'm not seeing this in my context. I see the code in lib/server.js. I do see a new settings object that includes the environment, but not these variables.

Fauntleroy commented 11 years ago

dev and development only appear if your server is running in development mode. Are you sure it is?