'http-server' is not recognized as an internal or external command

@BenFortune found the answer it was

http-server needs to be installed globally with npm install -g http-server


If the accepted solution did not work for you. Try the following. This solved the issue in my system.

Make sure the locations of both npm and http-server are added in environment variable 'PATH' (Both user variable and System variable).

If it is not present,

add C:\Users\username\AppData\Roaming\npm and C:\Users\username\AppData\Roaming\npm\node_modules\http-server to environment variable 'PATH'