如何在VS代码中设置服务器路径



如何在VS代码中设置本地服务器设置路径。现在我变得像这样的http://localhost:8080/,但我想要http://localhost/myproject/index.html,看起来有时就像http://localhost/myproject/)。现在它在Chrome开放,但我想设置Firefox。

package.json

{
 "name": "TS",
 "version": "1.0.0",
 "description": "demo project.",
 "scripts": {
 "lite": "lite-server --port 8080",
 "start": "npm run lite"
 },
 "author": "",
 "license": "ISC",
 "devDependencies": {
 "lite-server": "^1.3.1"
 } 
 }

tasks.json

   {
   // See https://go.microsoft.com/fwlink/?LinkId=733558
   // for the documentation about the tasks.json format
   "version": "2.0.0",
   "tasks": [
    {
        "type": "npm",
        "script": "lite",
        "group": {
            "kind": "build",
            "isDefault": true
        }
    },
    {
        "type": "npm",
        "script": "start",
        "problemMatcher": []
    }
]
    }

vsc将打开您的默认浏览器。只需设置Firefox默认一个

最新更新