wachunga / omega

Real-time issue tracker optimized for small teams
http://omegatracker.herokuapp.com
MIT License
114 stars 26 forks source link

omega as a module #8

Open vicary opened 11 years ago

vicary commented 11 years ago

This gives more flexibility to work with omega, like sharing the same port with other services and so on.

I can contribute to this if you think this is good.

vicary commented 11 years ago

Modulizing can be a full interface from the module with carefully named public functions,

or as simply as doing the following lines for the users, separating from express dependency, then give public access to the Dao & tracker functions.

    issueDao = require('./lib/issueDao'),
    historyDao = require('./lib/historyDao'),
    projectDao = require('./lib/projectDao'),
    tracker = require('./lib/tracker')

which in tern gives public access as so

    var omega = require('omega');
      , omegaIssue = omega.issueDao
      , omegaHistory = omega.historyDao
      , omegaProject = omega.projectDao
      , omegaTracker = omega.tracker