I skipped a few steps initially to avoid boring you with the npm installation part. Here are the steps I took:
Package Configuration:
You will notice the script
section was updated. I will explain it later as we haven't discussed these files yet.
After setting up, you will see a few changes:
This configuration is fairly standard and is what you get with the default tsconfig
setup.
We will now create the source folder and a new file called index.ts
.
As previously discussed, we will create an Express app for our REST application and add an Express router to manage different routes. I will cover the router in detail in the next lesson.
For now, we can use GitHub Copilot to generate a basic application:
Go back to the package.json
file, locate the start
command, and execute it:
Run the script:
If everything is set up correctly, you should see the message:
Your server is now up and running!