简体   繁体   English

在Bluemix中上载Node.js应用程序

[英]Uploading node.js app in bluemix

I created a Node.js app that works locally. 我创建了一个在本地工作的Node.js应用程序。 It contains various routes as well as a login/registration system. 它包含各种路由以及登录/注册系统。 Everything is fine. 一切顺利。 I can login,register,and apply all requests(GET,POST,PUT,DEL) through postman! 我可以通过邮递员登录,注册和应用所有请求(GET,POST,PUT,DEL)!

Now I want to post that app in bluemix. 现在,我想在bluemix中发布该应用程序。 I created a manifest.yml file as shown. 如图所示,我创建了manifest.yml文件。

applications:
name: larissa-capstone
memory: 256M
disk_quota: 512M 
buildpack: nodejs_buildpack
domain: mybluemix.net
command: node server/web-server.js

However after running the push command cf push ,I get the following error. 但是,在运行push命令cf push之后 ,出现以下错误。

Incorrect Usage. The push command requires an app name. The app name can be 
supplied as an argument or with a manifest.yml file.

But I have the app's name in the manifest file. 但清单文件中有应用程序的名称。 Why is this happening? 为什么会这样呢?

Thanks, 谢谢,

Theo. 西奥

The manifest.yml does not have the required format . manifest.yml没有必需的格式 The name needs to be preceded with a dash and the other lines need to be indented. name前面必须带有破折号,其他行必须缩进。 Try something like this: 尝试这样的事情:

applications:
- name: larissa-capstone
  memory: 256M
  disk_quota: 512M 
  buildpack: nodejs_buildpack
  domain: mybluemix.net
  command: node server/web-server.js

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM