[英]Why can't I run my node.js express web application
Node.js and the express generator are really handy and simple to understand. Node.js和express生成器非常方便易懂。 I cannot however get my server to start by running c:\\my-application-root>DEBUG=my-application ./bin/www 但是我不能通过运行c:\\ my-application-root> DEBUG = my-application ./bin/www来启动我的服务器。
Windows doesn't seem to understand that command. Windows似乎不理解该命令。 I can however run it by calling node ./bin/www 然而,我可以通过调用节点./bin/www来运行它
Am i missing something? 我错过了什么吗?
Did you try set DEBUG=my-application
followed by node ./bin/www
? 您是否尝试过set DEBUG=my-application
后跟node ./bin/www
? Windows does not allow setting an environment variable in the way that Linux and others do. Windows不允许以Linux和其他方式设置环境变量。
第一个命令'set DEBUG = my-application'2nd command'npm start'
First you need to go the cmd that is supported by node (search for node cmd when you click in windows icon if you're using windows 7) type set DEBUG=my-application Second simply cd c:\\my-application\\bin\\ Then type node www 首先,您需要使用节点支持的cmd(如果您使用的是Windows 7,则在单击Windows图标时搜索节点cmd)类型设置DEBUG = my-application其次只需cd c:\\ my-application \\ bin \\然后键入节点www
www is the file that contains the script needed by node to run your server, DEBUG if set as an environment variable will also help you run node against it since the path will be known www是包含节点运行服务器所需脚本的文件,DEBUG如果设置为环境变量也将帮助您运行节点,因为路径将是已知的
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.