Globally install the Mojito CLI package (mojito-cli) from the npm registry so that you can run Mojito commands. You may need to use sudo if you run into permission errors.
$ npm install mojito-cli -g
Confirm that Mojito has been installed by running the help command.
$ mojito help
To make the application return a string we want, replace the code in mojits/myMojit/controller.server.js with the following:
YUI.add('myMojit', function(Y, NAME) {
Y.namespace('mojito.controllers')[NAME] = {
index: function(ac) {
ac.done('Hello, world. I have created my first Mojito app at ' + (new Date()) + '.');
}
};
});
From the hello_world application directory, start Mojito:
$ mojito start
Go to http://localhost:8666/@myMojit/index to see your application.
Stop your application by pressing Ctrl-C.
For a more in-depth tutorial, please see Tutorial: Creating Your First Application. To learn more about Mojito, see the Mojito Documentation.