So let's get started with our note typescript application.
Now you might think that we need a complex set up with Webb pack and so on now but we actually don't.
We'll just use the T as C command to compile our files and then we can use the node command to execute
our compiled files.
That's all we need here.
Still I will set up a project here with NPM in it simply so that we get a package start.
Jason File because since we'll create a normal node application here will install some third party packages
like express J S and I also want to install one extra tool that simplifies our development process to
run NPM and it here in any empty folder of your choice.
You can confirm all the default settings here if you want.
And thereafter you will have a package not Jason File which should look something like this.
Now all the runs.
Yes see dash dash in it in here to all initialize this project as a type of project.
So did you get this t is conflict or Jason File which you now confined you to your requirements and
there.
I already got the first adjustment I want to make the target here can easily be set to iOS 2018 for
example depending on the Node words you're using but if you're using the latest one does modern javascript
syntax should definitely be supported.
Module can stay at common J.S. but then I also want to add module resolution here and set this to node.
This simply tells typescript how your different files and imports will work together and we need to
set this to know to make sure that everything works correctly.
I will also set my outer here comment this instead of two disks and my router to source because I want
to separate my typescript source code and then the output which will be the actual JavaScript files
we can execute with help of node.
Other than that I'm fine with strict mode but of course you can find through this all to your personal
needs and likings you learned all about that throughout this course after all.
And with that we can save this configuration.
You all also find this very basic starting setup attached by the way you can save this configuration
and I'll also create a source folder where we will write our source code our typescript source code
and that's the part where I now want to dive in we'll build our application with typescript in the source
folder now and since we'll build a simple web server and we also want to use Express J.S. there.
I will first of all install some dependencies here with npm install dash dash save I want to install
express here which is the express framework for node J.S. which you of course don't always need.
But here I want to build a node express application and it will install the body dash parser package
which helps us parse incoming request bodies for now it's it's regarding my production dependencies
we might add more later.
So let's hit Enter here and with that installed let's have a look at the development dependencies.
I'll install those with npm install dash dash save dash death and Area 1 to install node on a tool which
allows us to execute a file with node but which then watches the file and the folder to file this in
as well as all sub folders for changes and whenever a file changes it will restart the node server.
This will simply speed up development because it will automatically restart our node application server
every time we change the source code.
We need to restart the server when the code changes because otherwise our server still runs on the old
code but manually restarting is annoying.
So we can speed this up with Node 1 and for the moment that's actually it so lets it enter here and
install this development dependency.
It will not be the last one we need in this course but for the moment we're fine.
So let's wait for this to finish so installation did finish And now let's start writing and creating
a very basic node express application.