Our Seelie project and the local API project now both have NPM run start commands tied to them.
So if we ever want to do any kind of parallel development or essentially develop both these packages
at the same time, we would have to run NPM run, start inside of both project directories.
So we could do that very easily, of course, by going back over to our terminal, opening up a second
terminal window, changing over to our local API directory inside of one.
And then making sure that we're inside of the Seelie directory inside the other and then inside of these
terminal windows, we can do an NPM run start.
That's going to start up, TypeScript, inside of both these sub packages.
Now, this definitely works, but as you can imagine, if we eventually have several different packages
that we want to run all at the same time, we're going to have to open up a lot of different terminal
windows.
So instead, we're going to create a little convenience command for us that's going to execute NPM run,
start at the same time in all of our different packages.
Let me show you how to do it.
Back inside my code editor.
I'm going to find inside of our root project directory the package JSON file, this file was generated
when we initially ran in it a little bit ago.
Right now, there's not a lot of stuff inside of here, but we're going to add in a new section called
Scripts.
We're going to add in one script for right now called Simply Start, and whenever we run this command,
we're going to actually execute llena.
Run, start, dash, dash, Perello.
Learn to run, start Dasht Parallel is going to execute the start script inside of each of our different
packages to learn who is going to automatically go into each package, see if they have a defined start
script, and if they do, it's going to run them all.
It's going to run all these commands in parallel.
So essentially run them all at the exact same time.
At present, all three of our packages have a start command, including the REACT project as well.
So if we go back over to our terminal and do an NPM run, start from inside of our route project directory,
it'll execute the start script inside of all three of our different projects so we can essentially start
up the entire project like all the different packages we have by running one single command.
So let's try that out back over at my terminal.
I'm going to stop one of these, we're going to stop them both, I'm going to close one of them, some
now back down to just one terminal window.
I'll then change back to my roots project directory.
So here's my root directory inside there.
I've got my packages on file and the packages directory.
I'll then do an NPM run start.
And I forgot to save the file, let me do that really quick.
There we go.
So as soon as I run, that command will then see a lot of output start to scroll by.
So I see some logs are being produced by our local API project, by the Clie and Geopark right here.
That's actually our Riak project as well.
OK, so we're now running all three projects in parallel.
The one downside to this is that if we start spitting out a lot of logs, well, our terminal is going
to get really dirty really quickly.
So you still might want to run each of your different packages inside of a different terminal window.
It is totally up to you.
One other quick thing I want to mention just a moment to go inside of our.
Package Jason, files inside of SQLite and local AP, remember, we put on that preserve watch output,
so we put that on because by default, whenever you're running TSC in watch mode, whenever it does
a compilation, it's going to clear whatever's currently at your inside of your terminal window.
So in other words, default behavior is to clear all this output whenever TSA runs again.
And obviously that would destroy any other log's we have from, say, our Riak project, not really
desirable.
So that is why we put on that reserve watch.
Output, that option right there, just to make sure that we didn't destroy all those logs.
OK, so that's pretty much it.
So now we've got one command to run all of our different packages in a sort of development mode.
Well, this is pretty good.
So let's pause right here and then continued development in just a moment.