Skip to content
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

using promise when datasource is ready #1

Closed
joshua1 opened this issue Jun 12, 2014 · 1 comment
Closed

using promise when datasource is ready #1

joshua1 opened this issue Jun 12, 2014 · 1 comment

Comments

@joshua1
Copy link

joshua1 commented Jun 12, 2014

Hi ,
is it possible to return a promise when ds is ready to create model as against using the ds.once and wrapping supposed method calls that (could be exposed to other modules) inside ds.once() . for instance

var ds=loopback.createDataSource('soap',
{
connector: require('../index'),
remotingEnabled: true,
// wsdl: 'http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL' // The url to WSDL
wsdl: path.join(__dirname, './weather.wsdl')
}).then(function(){
return ds.createModel('WeatherService', {});
});

@gunjpan
Copy link
Contributor

gunjpan commented May 11, 2016

@joshua1 : It's not possible right now as createDataSource() function is not yet promisified. You can track the progress of making LoopBack promise-enabled here.

Closing due to inactivity. Please feel free to reopen this in Loopback repo as it's appropriate repo for this request. Thank you.

@gunjpan gunjpan closed this as completed May 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants