Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

258
Visualizações
Connecting meteor apk to heroku / mLab db

This is my first post to the site. Your community has helped me solve so many problems in making my first Meteor application, but this is a problem I cannot seem to resolve after days of searching.

I have successfully deployed my app to heroku, using the mLab add on. I can see my app & mongo db working correctly in a web browser.

I am now trying to publish to android, and can successfully build and open my apk on my device. My problem is that I can't get past the log in screen on my app. I think this is because it can't connect to the mLab database.

What I am currently doing

I am building the apk using a command that looks like this:

$ meteor build /my/output/location --server mongodb://ds898989.mlab.com:898989/heroku_898989

Where I have changed the actual server address for 898989

Is this the correct information needed to access the database? Everything I've read here suggests that it is. Perhaps this not how you enter the host:port info for mLab. I have studied the docs here to get this address. The docs say I don't need to provide credentials in this URI, though I have tried both with and without my credentials with the same result. Is anyone able to give an example of what the server field should look like in this command when using a heroku/mLab database?

What I may be overlooking

I've read about setting the environment variables in settings.json, I have not done this since I believe these are all set in heroku. Do I need to set the information in this file to build to android? What should my settings.json file look like if I want my apk to connect to a heroku/mLab set up? So far my research has not yeilded any answers. Is anyone able to point me to an example settings.json file for a heroku/mLab set up?

What else?

I'm using the accounts templates package to handle my login. I can input data into the fields to create an account, but get no feedback at all when I press register. I have an alert() that displays an error message when the server reports and error with sign up (fired from the onSubmitHook in the AccountsTemplates package). I'd expect it to display this message if there was a database connection, so I'm reasonably confident the problem isn't with the login systems.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

After much fiddling I managed to solve this by changing the build command to look like :

$ meteor build /my/output/location --server http://myappp.herokuapp.com

I didn't need to provide an explicit port.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda