如何托管使用Polymer创建的应用程序?

时间:2016-04-13 11:11:51

标签: heroku polymer web-hosting host

我已经搜索了这个问题几个星期了,并且无法找到解决这个简单问题的方法。它似乎很快就变得非常复杂。

我已经阅读了node.js Heroku入门和许多其他教程,但似乎它不能与Polymer合作。当我从我的目录中的命令行运行<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/white" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/white" android:orientation="vertical"> <RelativeLayout android:id="@+id/layoutPopUp" android:layout_width="match_parent" android:layout_height="79dp" android:background="#F57F20" android:paddingBottom="20dp" android:paddingTop="20dp" android:visibility="visible"> <LinearLayout android:id="@+id/linearLayout1" android:layout_width="match_parent" android:layout_height="match_parent" android:weightSum="1"> <LinearLayout android:id="@+id/backlayout" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="0.2" android:orientation="horizontal"> <ImageButton android:id="@+id/btnBackbutton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginLeft="10dp" android:background="@color/transparent" android:gravity="center" android:src="@drawable/back" android:visibility="visible" /> <TextView android:id="@+id/textBack" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginLeft="5dp" android:gravity="center" android:text="Back" android:textAppearance="?android:attr/textAppearanceMedium" android:textSize="15sp" /> </LinearLayout> <TextView android:id="@+id/textTitle" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_weight="0.6" android:gravity="center" android:text="Contact Us" android:textAppearance="?android:attr/textAppearanceMedium" android:textSize="20sp" android:textStyle="bold" /> <ImageButton android:id="@+id/imagePopUp" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:layout_weight="0.2" android:background="@color/transparent" android:gravity="center" android:src="@drawable/menu" android:visibility="visible" /> </LinearLayout> </RelativeLayout> <ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <EditText android:id="@+id/editTextName" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:layout_marginTop="10dp" android:background="@drawable/editboxshap" android:ems="10" android:hint="Name" android:inputType="textPersonName" android:singleLine="true" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="#2b2b2b" android:textColorHint="#2b2b2b" android:textCursorDrawable="@color/black"> <requestFocus /> </EditText> <EditText android:id="@+id/editPhone" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:layout_marginTop="10dp" android:background="@drawable/editboxshap" android:ems="10" android:hint="Phone No." android:inputType="phone" android:maxLength="12" android:singleLine="true" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="#2b2b2b" android:textColorHint="#2b2b2b" android:textCursorDrawable="@color/black" /> <EditText android:id="@+id/editEmail" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:layout_marginTop="10dp" android:background="@drawable/editboxshap" android:ems="10" android:hint="E-mail" android:inputType="textEmailAddress" android:singleLine="true" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="#2b2b2b" android:textColorHint="#2b2b2b" android:textCursorDrawable="@color/black" /> <EditText android:id="@+id/editComment" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:layout_marginTop="10dp" android:background="@drawable/editboxshap" android:ems="10" android:gravity="start" android:hint="Comments" android:inputType="textMultiLine" android:lines="3" android:maxLength="500" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="#2b2b2b" android:textColorHint="#2b2b2b" android:textCursorDrawable="@color/black" /> <Button android:id="@+id/btnSubmit" android:layout_width="match_parent" android:layout_height="35dp" android:layout_gravity="center_horizontal" android:layout_marginBottom="5dp" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:layout_marginTop="20dp" android:background="@drawable/button_shape" android:text="SUBMIT" android:textColor="@color/white" /> </LinearLayout> </ScrollView> </LinearLayout> 时,我可以看到我的应用程序外观和工作正常我可以在localhost中查看我的应用程序,它看起来很棒!

如果有人知道我应该从哪里开始,或者可以指出任何有用的链接,这将是惊人的!如果有一些免费提供的骨架聚合物网站,那就更好了。

1 个答案:

答案 0 :(得分:4)

如果您没有尝试使用聚合物应用程序托管node.js或其他后端,则可以使用github页面。 https://pages.github.com/

Polymer app本质上只是浏览器需要从远程服务器检索的文件。您不需要在主机服务器上安装后端。如果您尝试托管node.js或其他后端,可以使用heroku来托管它。

相关问题