See everything in code veiw
First Create a New project api-example then go to new terminal type mkdir api-example cd api-example and then enter
then in the new terminal type npm init -y then enter
type this in new terminal npm install express
then enter
and then make a new file server.js and put that code that i have given as serevr.js
after you have copied that code type node server.js in new terminal