1
00:00:01,230 --> 00:00:07,240
Our Seelie project and the local API project now both have NPM run start commands tied to them.

2
00:00:07,560 --> 00:00:11,700
So if we ever want to do any kind of parallel development or essentially develop both these packages

3
00:00:11,700 --> 00:00:16,770
at the same time, we would have to run NPM run, start inside of both project directories.

4
00:00:17,250 --> 00:00:22,110
So we could do that very easily, of course, by going back over to our terminal, opening up a second

5
00:00:22,110 --> 00:00:27,120
terminal window, changing over to our local API directory inside of one.

6
00:00:28,370 --> 00:00:32,600
And then making sure that we're inside of the Seelie directory inside the other and then inside of these

7
00:00:32,600 --> 00:00:35,210
terminal windows, we can do an NPM run start.

8
00:00:36,560 --> 00:00:39,520
That's going to start up, TypeScript, inside of both these sub packages.

9
00:00:40,000 --> 00:00:44,130
Now, this definitely works, but as you can imagine, if we eventually have several different packages

10
00:00:44,130 --> 00:00:47,640
that we want to run all at the same time, we're going to have to open up a lot of different terminal

11
00:00:47,680 --> 00:00:48,190
windows.

12
00:00:48,790 --> 00:00:53,710
So instead, we're going to create a little convenience command for us that's going to execute NPM run,

13
00:00:53,710 --> 00:00:56,950
start at the same time in all of our different packages.

14
00:00:57,430 --> 00:00:58,390
Let me show you how to do it.

15
00:00:59,490 --> 00:01:00,810
Back inside my code editor.

16
00:01:02,250 --> 00:01:07,740
I'm going to find inside of our root project directory the package JSON file, this file was generated

17
00:01:07,740 --> 00:01:10,800
when we initially ran in it a little bit ago.

18
00:01:11,490 --> 00:01:15,210
Right now, there's not a lot of stuff inside of here, but we're going to add in a new section called

19
00:01:15,210 --> 00:01:15,810
Scripts.

20
00:01:17,890 --> 00:01:22,780
We're going to add in one script for right now called Simply Start, and whenever we run this command,

21
00:01:22,810 --> 00:01:24,990
we're going to actually execute llena.

22
00:01:25,000 --> 00:01:28,090
Run, start, dash, dash, Perello.

23
00:01:29,330 --> 00:01:35,210
Learn to run, start Dasht Parallel is going to execute the start script inside of each of our different

24
00:01:35,210 --> 00:01:40,910
packages to learn who is going to automatically go into each package, see if they have a defined start

25
00:01:40,910 --> 00:01:43,310
script, and if they do, it's going to run them all.

26
00:01:44,060 --> 00:01:45,730
It's going to run all these commands in parallel.

27
00:01:45,740 --> 00:01:48,110
So essentially run them all at the exact same time.

28
00:01:49,640 --> 00:01:54,960
At present, all three of our packages have a start command, including the REACT project as well.

29
00:01:55,340 --> 00:02:00,590
So if we go back over to our terminal and do an NPM run, start from inside of our route project directory,

30
00:02:00,950 --> 00:02:06,680
it'll execute the start script inside of all three of our different projects so we can essentially start

31
00:02:06,680 --> 00:02:11,660
up the entire project like all the different packages we have by running one single command.

32
00:02:12,290 --> 00:02:14,990
So let's try that out back over at my terminal.

33
00:02:16,300 --> 00:02:20,830
I'm going to stop one of these, we're going to stop them both, I'm going to close one of them, some

34
00:02:20,830 --> 00:02:22,420
now back down to just one terminal window.

35
00:02:23,220 --> 00:02:25,690
I'll then change back to my roots project directory.

36
00:02:26,410 --> 00:02:28,270
So here's my root directory inside there.

37
00:02:28,270 --> 00:02:31,690
I've got my packages on file and the packages directory.

38
00:02:32,720 --> 00:02:35,000
I'll then do an NPM run start.

39
00:02:36,060 --> 00:02:38,310
And I forgot to save the file, let me do that really quick.

40
00:02:38,460 --> 00:02:38,910
There we go.

41
00:02:40,230 --> 00:02:43,890
So as soon as I run, that command will then see a lot of output start to scroll by.

42
00:02:44,370 --> 00:02:50,780
So I see some logs are being produced by our local API project, by the Clie and Geopark right here.

43
00:02:50,790 --> 00:02:52,730
That's actually our Riak project as well.

44
00:02:54,710 --> 00:02:57,330
OK, so we're now running all three projects in parallel.

45
00:02:57,680 --> 00:03:01,880
The one downside to this is that if we start spitting out a lot of logs, well, our terminal is going

46
00:03:01,880 --> 00:03:03,560
to get really dirty really quickly.

47
00:03:03,830 --> 00:03:08,070
So you still might want to run each of your different packages inside of a different terminal window.

48
00:03:08,090 --> 00:03:09,050
It is totally up to you.

49
00:03:10,250 --> 00:03:14,510
One other quick thing I want to mention just a moment to go inside of our.

50
00:03:15,390 --> 00:03:21,720
Package Jason, files inside of SQLite and local AP, remember, we put on that preserve watch output,

51
00:03:22,120 --> 00:03:27,600
so we put that on because by default, whenever you're running TSC in watch mode, whenever it does

52
00:03:27,600 --> 00:03:32,670
a compilation, it's going to clear whatever's currently at your inside of your terminal window.

53
00:03:33,000 --> 00:03:38,310
So in other words, default behavior is to clear all this output whenever TSA runs again.

54
00:03:38,970 --> 00:03:43,470
And obviously that would destroy any other log's we have from, say, our Riak project, not really

55
00:03:43,470 --> 00:03:44,040
desirable.

56
00:03:44,100 --> 00:03:47,640
So that is why we put on that reserve watch.

57
00:03:49,940 --> 00:03:54,590
Output, that option right there, just to make sure that we didn't destroy all those logs.

58
00:03:55,850 --> 00:03:57,000
OK, so that's pretty much it.

59
00:03:57,170 --> 00:04:01,850
So now we've got one command to run all of our different packages in a sort of development mode.

60
00:04:02,480 --> 00:04:03,320
Well, this is pretty good.

61
00:04:03,420 --> 00:04:06,070
So let's pause right here and then continued development in just a moment.

