Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

run live server from npm start

How do I run live-server from the command line?

1) Install live-server as a dev dependency:

npm i -D live-server

2) Add a start script to package.json:

"scripts":{
  "start": "live-server --open=./index.html"
}
 
PREVIOUS NEXT
Tagged: #run #live #server #npm #start
ADD COMMENT
Topic
Name
6+1 =