如何一起启动离子应用程序和nodejs服务器

时间:2017-02-10 15:33:53

标签: node.js express ionic-framework

我有离子应用程序和nodjs服务器应用程序。这两个应用程序都作为单个应用程序进 目前我用两个cmd开始应用程序(一个用于启动nodejs服务器[node server],另一个用于启动离子应用程序['ionic serve'])

我只需要如何在单个命令中一起启动应用程序  请帮忙

1 个答案:

答案 0 :(得分:1)

如果您正在寻找一次执行多个命令的方法,那么您可以执行以下操作:

node server; ionic serve

或者:

node server && ionic serve

第一个先执行node server然后ionic serve执行node server而不检查ionic serve是否有任何错误,第二个只会node server int i = 0; using (var sw = new StreamWriter(this.filePath)) { foreach (SimplePlaylist playlist in myPlaylists) { this.PlaylistTracks[i] = new List<PlaylistTrack>(); this.PlaylistTracks[i] = GetPlaylistTracks(playlist.Owner.Id, playlist.Id); foreach (PlaylistTrack tr in this.PlaylistTracks[i]) { string write = tr.Track.Name + " // " + string.Join(",", tr.Track.Artists.Select(source => source.Name)) + " // " + tr.Track.Album.Id; string line = ""; bool found = false; using (var sr = new StreamReader(this.filePath)) { while ((line = sr.ReadLine()) != null) { if (line.Equals(write)) { found = true; break; } } sr.Close(); } if (!found) { sw.WriteLine(write); } } i++; } sw.Close(); } Google_Service_Exception { "error": "unauthorized_client", "error_description": "Client is unauthorized to retrieve access tokens using this method." } 是成功的。有更多选项供您选择,您可以找到它们here