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

时间:2017-12-24 09:35:08

标签: typescript visual-studio-code vscode-tasks

如何在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": []
    }
]
    }

1 个答案:

答案 0 :(得分:0)

VSC将打开您的默认浏览器。只需将Firefox设置为默认值

即可