Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var args = [
'preview', 'app', 'run', opts.dir,
'--host', serverAddr,
'--datastore-path', IOWA.backendDir + '/.gae_datastore'
];
var backend = spawn('gcloud', args, {stdio: 'inherit'});
if (!opts.reload) {
console.log('The app should now be available at: ' + url);
backend.on('close', callback);
return url;
}
browserSync.emitter.on('service:exit', callback);
// give GAE server some time to start
setTimeout(browserSync.bind(null, {notify: false, open: false, port: 3000, proxy: serverAddr}), 2000);
return 'http://localhost:3000' + IOWA.urlPrefix;
}