You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.
Albert Jimenez edited this page Mar 24, 2014
·
4 revisions
In the previous versions of Mojito, you set the base context with the Mojito command-line tool using the option --context. In Mojito v0.9, you start applications directly with app.js, so you need to alter the app.js so that your application can be extended and accept context configurations, such as the runtime and the environment.
To extend your applications, you create an instance of your Mojito applications and use the extend method:
varexpress=require('express'),libmojito=require('mojito'),app=express();libmojito.extend(app,{// Pass your context object here.});
For example, to have your applications start in the staging environment and use the server runtime, you would pass the context object below to the extend method: