You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
run npm install live-server to add it as a dependency to package.json
put this script in package.json "start": "live-server --root=docs" or rename docs to a project within your project directory.
run npm start
This is how I expect the NPM live-server, as a developer, to use live server. This is how I want to use live-server, this is how I want to start it. This is how I want other people to be able to start my server. My instructions for other people using my project are npm install and npm start.
Outcome
Live server starts in a directory relative to the root of my system /docs/
Expected
Live server to append the --root path to $(cwd) internally when one directory exists and the other directory does not exist
Currently, there is no way described in the instructions to launch live server with a path relative to my project, and then transfer those launch commands to someone else's computer because they are absolute paths. Even though my project can handle relative paths, live-server cannot. This is a very very very basic use case that live-server doesn't support and it should be removed as an NPM package if it can't be used this way.
Maybe an option --relative-root is necessary here so that I can instruct people how to launch my project?
The text was updated successfully, but these errors were encountered:
Before submitting an issue, please, see https://github.com/tapio/live-server#troubleshooting
Issue description
Live-server requires an absolute path for root.
Software details
live-server
:live-server
version: live-server 1.2.2Basic example
npm init
inside your project.npm install live-server
to add it as a dependency to package.json"start": "live-server --root=docs"
or rename docs to a project within your project directory.npm start
This is how I expect the NPM live-server, as a developer, to use live server. This is how I want to use live-server, this is how I want to start it. This is how I want other people to be able to start my server. My instructions for other people using my project are
npm install
andnpm start
.Outcome
Live server starts in a directory relative to the root of my system /docs/
Expected
Live server to append the --root path to $(cwd) internally when one directory exists and the other directory does not exist
Currently, there is no way described in the instructions to launch live server with a path relative to my project, and then transfer those launch commands to someone else's computer because they are absolute paths. Even though my project can handle relative paths, live-server cannot. This is a very very very basic use case that live-server doesn't support and it should be removed as an NPM package if it can't be used this way.
Maybe an option
--relative-root
is necessary here so that I can instruct people how to launch my project?The text was updated successfully, but these errors were encountered: