简体   繁体   English

我已经通过云9创建了一个节点应用程序,但是如何将应用程序与网站连接起来?

[英]I've created a node app through cloud 9, but how do I connect my app with my website?

I've made a Node.js app, and it functions on Cloud 9 as an HTML page, but I want to move it to a web address that I currently own and for the life of me I can't seem to figure out how to link the backend to the front end. 我已经制作了一个Node.js应用程序,它在Cloud 9上可以作为HTML页面运行,但是我想将其移动到我目前拥有的网址中,对于我一生,我似乎无法弄清楚将后端链接到前端。 I'm going to try to deploy the backend to a Heroku server, but how would I go about getting my app to display on a web address that I currently own? 我将尝试将后端部署到Heroku服务器,但是如何使我的应用程序显示在当前拥有的网址上?

Cloud9 does not allow for public hosting of websites: see here . Cloud9不允许公共托管网站: 请参阅此处 You cannot point your own domain name to a cloud9 workspace. 您不能将自己的域名指向cloud9工作区。

If you're already moving a part of your app to Heroku, why not move the rest of it? 如果您已经将应用程序的一部分移至Heroku,为什么不将其其余部分移至此? Heroku provides hosting services, and you can point your domain there. Heroku提供托管服务,您可以将您的域名指向那里。 See here for a tutorial on how to do that. 有关如何执行此操作的教程,请参见此处

Otherwise, if you have two separate apps, you can point your domain to the Heroku app, and then set up a redirect on the route/subdomain to take the user to the cloud9 app. 否则,如果您有两个单独的应用程序,则可以将您的域指向Heroku应用程序,然后在路由/子域上设置重定向以将用户带到cloud9应用程序。 This is bad practice, but it works. 这是不好的做法,但是可以。

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

相关问题 如何将我的网站连接到我的节点应用程序? - How to connect my website to my node app? 如何使用我的应用程序生成一个静态网站? - How do I generate a static website with my react app? 我在哪里将mongodb Atlas连接到我的React应用程序? - Where do I connect my mongodb Atlas to my react app? 我已经从我的jsp服务器中的android应用收到了HTTP POST,如何将数据传递到Javascript函数中 - I've received an HTTP POST from an android app in my jsp server, how do I pass that data into a Javascript function 如何将服务连接到 Cloud Foundry 应用程序? - How do I connect service to a Cloud Foundry app? 如何在谷歌云中连接到我的 SSH VPS? - How do I connect to my SSH VPS in google cloud? 如何将我的 html 按钮值与我创建的变量链接? 现在它说将其记录为 html object 但不是按其价值 - How do I link my html button value with the variables i've created? right now it says logs it as an html object but not by its value 如何将Azure SQL连接到我的HTML5 Web应用程序 - How do I connect Azure SQL to my HTML5 web app 我如何将mongoose / mongodb连接到我的React App.js文件 - How do I connect mongoose/mongodb to my React App.js file 如何通过 Node API 正确路由数据? - How do I properly route data through my Node API?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM