How to open server as per Lecture 6 part 1 video in Clousure_project | JS, TS, React and Angular Forum
M
Monal Posted on 27/08/2021

ON Lecture 6 Part 1 Video ,https://www.javaspringhibernate.com/javascript-training/module/432

How to open server on closure project

Please provide steps 

In your video you start with opeining the Visual Studio Code ane Terminal window open to enter command : http-server -p 3000

So what you did before getting to that step

Currentl when I tried that commond on my mac in Visual Studio Code terminal it did not worked 

Please see attached screen shots


M
Monal Replied on 27/08/2021

This screen shot is where you enter command in your lecture

Responsive image

M
Monal Replied on 27/08/2021

Sorry wrong screen shot above I wish there is option to remove or edit 

Responsive image

M
Monal Replied on 27/08/2021

Guess what I played around and this is what I have to do get started 

npx http-server -p 3000

see screen shot 

Please in video make sure to mention steps to run serve and all the minute detail steps so it woul be easy to follow with your lecture video

-Monal

Responsive image

M
Monal Replied on 27/08/2021

I used this information for http-server

https://www.npmjs.com/package/http-server


Y
Yogesh Chawla Replied on 28/08/2021

Yes, The above error comes when http-server is not installed in the environment.

You did it right by installing http-server globally it via command:

npm install -g http-server

 

And if by any chance the above solution doesn't work then make sure npm( including http-server) is added in environment variable 'PATH' (Both user variable and System variable). Check this kind of an entry(snapshot).

Responsive image

M
Monal Replied on 09/09/2021

Ok Thanks Yogesh please close this ticket

-Monal