Deploy angular-meteor on openshift?

Hi guys,
Hi @Urigo

Did anyone successful deploy angular-meteor on openshift?

I’m choosing openshift and I can start the app, but from Browser Console Log, I saw something like this:

Error: [ng:areq] Argument ‘InboxCtrl’ is not a function, got undefined
http://errors.angularjs.org/1.5.3/ng/areq?p0=InboxCtrl&p1=not%20aNaNunction%2C%20got%20undefined

Already test on my local and the app was OK.

Just wonder that anyone deploy your angular-meteor app to any server?
I can’t use Galaxy because I’m using a free version and it asked me my credit card to add mongoDB driver to connect to mLab.

Any suggestion would be great!!!
Regards!

Hi guys,

I’ve solved my problem already. Here’s for someone else if you get into this issue:

Add this import to routes.js

import InboxCtrl from ‘./controllers/inbox.controller’;

Change this line inside from:

controller: ‘InboxCtrl as inbox’

To:

controller: InboxCtrl,
controllerAs: ‘inbox’

There you go, no complain about missing some angular controller.

I’ve already tested on OpenShift and Heroku. Right now I’m using heroku.

Cheer!
MNChau.

@Urigo: I think you should update your tutors, so anyone else would not get into troubles when they put their app on production. Regards.

Thanks for the update @mnchau , where exactly do you think I should change the docs?
Can you maybe create an issue or PR for that?

Hi @Urigo,
I mean the routes.js file.
Add these line to the final version or follow steps:

import ChatsCtrl from ‘./controllers/chats.controller’;
import ChatCtrl from ‘./controllers/chat.controller’;
import LoginCtrl from ‘./controllers/login.controller’;
import ConfirmationCtrl from ‘./controllers/confirmation.controller’;
import ProfileCtrl from ‘./controllers/profile.controller’;
import SettingsCtrl from ‘./controllers/settings.controller’;
import NewChatCtrl from ‘./controllers/new-chat.controller’;

Change the controller define in routes.js from:

controller: ‘ChatsCtrl as chats’

To:

controller: ChatsCtrl,
controllerAs: ‘chats’

I’m not so sure why I have to do this, but It would not cause the issue those controller not defined.
I mean, the tutor work fine at local, but when I submit to server like OpenShift or Heroku, it would be fail.

Right now,
I’m facing a similar problem with WhatsApp (clone version - following the tutor) when I put it on OpenShift.
Please take a look at this post:
https://forums.meteor.com/t/build-a-whatsapp-clone-with-meteor-and-ionic-meteor-platform-version/12139/65

I don’t know where to define “NewChatCtrl” because it’s not declare in the routes.js file.
There only one place that I find the declare is in “new-chat.html” which is like this:

<ion-modal-view ng-controller="NewChatCtrl as chat">

Please help me understand the issue and hopefully that I could solve the problem.
Regards!

============ UPDATE ============

============ UPDATE ============
The problem has been solved.
Please look at this post.

https://forums.meteor.com/t/build-a-whatsapp-clone-with-meteor-and-ionic-meteor-platform-version/12139/72
============ DONE ============

Hi,can anyone tell me how can I deploy meteor 1.4 app to openshift? I’am new to meteor.
Thank you.