问题描述
我最近使用github上的angular-seed文件夹进行了角度应用程序开发.在以前的一些angularjs教程中,angular-seed文件夹中有一个脚本文件夹和一个server.js文件,它们具有用于运行节点服务器的所有配置.那么npm现在如何开始运行节点服务器,该节点服务器的所有配置在哪里?
I recently used a angular-seed folder from github for angular application development. In some previous angularjs tutorial there was a script folder and a server.js file in the angular-seed folder which had all the configuration for running the node server. So how does npm now just start running a node server and where is all the configuration of that node server?
推荐答案
如果您要查看package.json
文件.
您将看到类似的内容
"start": "http-server -a localhost -p 8000"
这告诉在端口8000
上的localhost
地址处启动http-server
This tells start a http-server
at address of localhost
on port 8000
http服务器是节点模块.
更新:-包括@Usman的评论,理想情况下,它应该出现在您的package.json
中,但是如果不存在,则可以将其包括在scripts
部分中.
Update:- Including comment by @Usman, ideally it should be present in your package.json
but if it's not present you can include it in scripts
section.
这篇关于npm start如何在端口8000上运行服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!