New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for starting services with a "run" method #1

Open
wants to merge 1 commit into
base: master
from
Open
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.
+1 −1
Diff settings

Always

Just for now

fix for starting services with a "run" method

Previously having a "run" method in a service that is not run via the
unified server would generate a runtime error that "name" does not exist.

This fixes it, so you can use services that are intended to start via
"run()", for nice things like setting up dependency injection
  • Loading branch information...
ericblade committed Oct 18, 2018
commit aca50682b5cded18444510d4c8ee0d61eeafc4b3
Copy path View file
@@ -103,7 +103,7 @@ function loadAndStart(paramsToScript, appId) {
//console.log('loading node module from ' + service_dir);
var mod = require(service_dir);
if (mod.run) {
mod.run(name);
mod.run(appId);
}
} else if (fs.existsSync('sources.json')) { // mojoservice-based service
loadSource();
ProTip! Use n and p to navigate between commits in a pull request.