如何从3000更改服务器端口? [英] How to change the server port from 3000?

查看:133
本文介绍了如何从3000更改服务器端口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚结束了Angular 2的教程,我找不到将localhost端口从3000更改为8000的方法.在我的package.json文件中,有一行"start": "concurrent \"npm run tsc:w\" \"npm run lite\" "相信是相关的,但我不确定.

I just ended the tutorial of Angular 2 and I can't find a way to change the localhost port from 3000 to 8000. In my package.json file there's the line "start": "concurrent \"npm run tsc:w\" \"npm run lite\" " that I believe is related but I'm not sure.

推荐答案

您可以按照文档例如

{
  "port": 8000,
  "files": ["./src/**/*.{html,htm,css,js}"],
  "server": { "baseDir": "./src" }
}

这篇关于如何从3000更改服务器端口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆