如何在Openshift中使用简单的npm-install? [英] How to use simple npm-install in Openshift?
问题描述
我正在尝试在我的openshift帐户上使用可爱的文件
I'm trying to use cute-files on my openshift account
https://www.npmjs.com/package/cute-files
我知道node.js的工作方式与在localhost:3000中一样,但是不像专家一样
I know node.js works as I did in localhost:3000 but not as expert,
我最终遇到了 http://cutefiles-powerupware.rhcloud.com/不是我在看.首先应该是Cute-files应用.
I'm ended up with http://cutefiles-powerupware.rhcloud.com/ that's not I'm looking it. It should be Cute-files app as start.
我做了PuTTY来访问终端以进行npm-install,但由于允许而没有运气.
I did PuTTY to access terminal to do npm-install but no luck due to permission.
问题是...我无法理解openshift的工作原理,我需要知道如何访问控制台以进行npm-install,然后执行"$ cute-files",alternativley我已经使用Git进行了提交和推送,文件已更新...我没有结果...我已经用了6或7个小时,Openshift的使用非常复杂,有人可以解释如何在openshift中安装和执行简单的node.js应用吗? /p>
The problem is... I cannot understand how openshift works, I need to know how to access console to do npm-install then, execute "$ cute-files", alternativley I've used Git to commit and push, the files are updated...I got no results... I've spent like 6 or 7 hours, Openshift has been very complicated me to use, can anyone explain how to install and execute simple node.js app in openshift?
推荐答案
您似乎无法访问Openshift和 run 任何命令. Openshift不是简单的托管或vps服务,而是PaaS.这意味着它们为您提供了运行特定服务的环境,尤其是您需要时.
It's not like you can access Openshift and run any command. Openshift isn't a simple hosting or vps service, it's a PaaS. That means they offer you an environment to run certain services in particular as you demand.
创建应用程序时,它将绑定到git存储库,该存储库在推送时将部署到openshift.
When you create an app it's bound to a git repository which when pushed will be deployed to openshift.
关于正在部署和运行的应用程序,不是是关于在端口3000中运行的node.js.Openshift具有一些默认的应用程序文件名和期望的端口.
About your application being deployed and runned, it's NOT about node.js running in port 3000. Openshift has some default application file names and port to expect.
因此,在这样的存储库的本地克隆中工作,您可以执行npm install
命令,该命令将下载node_modules
文件夹.
So, working in a local clone of such repository you might perform the npm install
command, that will download the node_modules
folder to be there.
- 首先,您应该在系统中安装
rhc
. /li> - 设法通过rhc克隆您的任何应用程序.
- 进行更改,然后执行git .
- 这些更改可能包括执行npm install获取依赖项.
- 执行
git push
时,希望更改会被部署.
- First you should install
rhc
in your system. - Manage to clone any of you applications via rhc.
- Make changes, and do git.
- Those changes may include doing npm install getting your dependencies.
- When doing
git push
, expect the changes to be deployed.
您确实应该阅读本指南.
这篇关于如何在Openshift中使用简单的npm-install?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!