简体   繁体   English

使用Ember.js和动态IP后端API的Web应用程序

[英]Web Application using Ember.js and the dynamic ip backend API

I'm playing more and more with Ember and I really like it. 我与Ember的比赛越来越多,我真的很喜欢。

It's new to me but guides are solid and everything. 它对我来说是新的,但指南很扎实,应有尽有。

I understand how to pin-point the API Server IP so Ember can use it, but I would like to make it more dynamic - The idea is that the API Server is on LAN network (or on dynamic IP WAN - but I don't want ddns for that) 我知道如何查明API服务器IP,以便Ember可以使用它,但我想使其更加动态-这个想法是API服务器位于LAN网络(或位于动态IP WAN上),但我不知道想要ddns)

The problem is that I currently have to type IP address then deploy and that version work with that one IP address. 问题是我目前必须输入IP地址然后进行部署,并且该版本可以使用该IP地址。 I would love to be able to type in IP address on first? 我希望能够首先输入IP地址吗? and then use that ip as the endpoint for api server. 然后将该IP用作api服务器的终结点。

I'm more than sure this is somehow possible but I lack the examples out there. 我非常确定这在某种程度上是可行的,但是我缺少那里的示例。

I understand that there should be application/index.js route that would check some kind of 'store' to check if there is ip address with array that was saved locally in file?/cookie? 我知道应该有application/index.js路由来检查某种“存储”,以检查是否存在带有本地保存在文件/ cookie中的数组的ip地址。 and if there is one then somehow load that ip to the adapters/application.js host? 如果有一个,则以某种方式将该IP加载到adapters/application.js主机?

如果必须初始化某些内容,请使用初始化程序。

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

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