Create the Start Script
When running on production, we don't need to use nodemon, concurrently or have TSC watching our source code for any changes we make to the files.
We can create a more simplified starting script that will just start the main server.js in NodeJS.
Open the package.json and add the highlighted line below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
You can now start your project by typing
Note that we only used
npm start and not
npm run start. The
run option is not necessary.
npm start is an alias for
npm run start. You can use the longer version if you prefer.
Other aliases you may see used occasionally are,