Here will be listed some utilities created to be used inside your RhapsodyJS app.

Logging

For use the logging system (configured in the file of your current environment in app/config/environment_name.js), you just use:

    Rhapsody.log.LOG_LEVEL(TITLE, MESSAGE);

For the API of Rhapsody.log, see the WolverineJS API.

Libs

All libs used internally by RhapsodyJS that you possibly would use in your app are accessible trough the Rhapsody global variable, they are:

Middlewares

When you're configuring the middlewares of a controller or a view, you can set any of then as the name of a file inside the app/middlewares folder (without the .js) or the function itself.

The NodeJS community has already created some standard middlewares, and some of them can be accessed by the Rhapsody global variable, they are:

Root folder of the app

The app root folder (that contains the app, node_modules, app.js and package.json) can be accessed by the variable Rhapsody.root.

Express app

The Express app of your project can be accessed in Rhapsody.app.