简体   繁体   English

在heroku部署我的应用程序时,我应该在baseURL中写什么?

[英]What should I write in baseURL while deploying my app at heroku?

i have problem at angular.js side in 'services.js' or say 'factory.js'. 我在'services.js'的angular.js方面遇到问题或者说'factory.js'。

I am not able to understand what should i write in replace of 'HERE' in baseURL when deplooying app at heroku: 我无法理解在heroku中使用deplooying app时应该在baseURL中替换'HERE'时应该写什么:

angular.module('confusionApp')
.constant("baseURL", "__HERE__")

When i leave it empty, i am able to register, but not login. 当我把它留空时,我可以注册,但不能登录。

I am using this when running my app locally: 我在本地运行我的应用程序时使用此功能:

angular.module('confusionApp')
.constant("baseURL", "http://localhost:3000/")

I am able to connect my database with mlab. 我能够用mlab连接我的数据库。

Everything goes well, except, when i tried to login in my app,i got error undefined in replace of $state.go(). 一切顺利,除非,当我尝试登录我的应用程序时,我在更换$ state.go()时得到错误未定义。

Here is the link to my app, kindly check it yourself: 这是我的应用程序的链接,请亲自检查:

http://idiscover.herokuapp.com/ http://idiscover.herokuapp.com/

This code worked: 这段代码有效:

angular.module('confusionApp')
.constant("baseURL", "")

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

相关问题 RequireJS - 我应该为BaseUrl设置什么? - RequireJS - what should I set for the BaseUrl? 部署节点应用程序时出现heroku错误 - heroku error while deploying node app 在 vercel 上部署我的 nextjs 应用程序时出现此错误 - I am getting this error while deploying my nextjs app on vercel 如何在部署 expressjs 应用程序时修复 heroku 错误? - how to fix heroku error while deploying an expressjs app? 在 Heroku 中部署 React 应用程序时 mapBox 出错 - Error in mapBox when I am deploying react app in Heroku 我应该怎么做才能在Web应用程序中使用特定字体? - What should I do to use a specific font in my web app? 是什么导致我部署的 Heroku 应用程序无法打开? - What is causing my deployed Heroku app to not open? 我无法使用 Axios 在我的 nuxt 应用程序中设置不同的 baseURL - I can't set a different baseURL in my nuxt app using Axios 在 heroku 等云服务器上部署 io 时,其本地主机地址应该是什么? - What should be the local host address for the io when deploying it on a cloud server like heroku? 我应该如何编写此条件以使按钮 onClick function 对我的数组执行我想要的操作? - How should I write this conditions to make the button onClick function do what I want with my array?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM