Full-Stack food order system made in MEAN.js
Faelo app is a full-stack system build in MEAN.js which aim is to offer a customer a range of food products to order. Then the customer can choose and order a menu build on its own.
The main features are:
I've stopped MEAN.io development (it was at the beginning, so lucky me) because some reasons:
So from now I'm using MEAN.js with the angular-fullstack yeoman generator. Since the beginning, I've found:
I've just followed the steps on the example of MEAN on OpenShift
.
.
NOTE: this development has been abandoned
Here I'll write the commands I've found out and the steps for creating the app.
Most used:
ssh [email protected]
: connect to the appApp info:
rhc show-app APP_NAME
: display info about the apprhc show-app APP_NAME --gears quota
: display info about the quota used by the appApp debug:
rhc tail -a APP_NAME
App management:
rhc app tidy APP_NAME
: runs a clean-uprhc app restart -a APP_NAME
Cartridge management:
rhc cartridge add CARTRIDGE_NAME -a APP_NAME
rhc cartridge restart CARTRIDGE_NAME -a APP_NAME
Install MongoDB and the Openshift command line (rhc). Of course, first create an Openshift account.
sudo brew install mongodb
gem install rhc
And run rhc setup
.
Then create the MEAN.IO ready boilerplate app:
rhc app create APP_NAME nodejs-0.10 mongodb-2.4 --env NODE_ENV=production --from-code https://github.com/linnovate/mean-on-openshift.git
Adds rockmongo:
rhc cartridge add rockmongo -a mean
Now you can access the interface by going to this url:
APP_NAME-DOMAIN_NAME.rhcloud.com/rockmongo
// In my case: mean-alextest.rhcloud.com/rockmongo
MongoDB uses preallocations, which is some kind of optimisations and security. But they take so much space.
After create the app, it takes 0.7GB out of 1GB. That's a problem because we only have 300MB left.
To gain some space, we can remove the defaults preallocations by running, on a ssh connection:
rm -rf mongodb/data/journal/*
Then from a host terminal:
rhc cartridge restart mongodb-2.4 -a APP_NAME
Now we should have around 700MB free.
Note: by default, OpenShift have disabled preallocations. There is no need to change the mongodb.conf
file
yo angular-fullstack YOUR_APP_NAME
yo angular-fullstack:openshift YOUR_APP_NAME
client
and server
folders, and change the appName in your Gruntfile.js, line 313
grunt build
and grunt buildcontrol:openshift
Additionally, add the environment variables:
rhc set-env TWITTER_ID=id -a APP_NAME
rhc set-env TWITTER_SECRET=secret -a APP_NAME
rhc set-env FACEBOOK_ID=id -a APP_NAME
rhc set-env FACEBOOK_SECRET=secret -a APP_NAME
rhc set-env GOOGLE_ID=id -a APP_NAME
rhc set-env GOOGLE_SECRET=secret -a APP_NAME
For production mode, I had to change on client/components/socket/socket.service.js
:
var ioSocket = io('http://fh-alextest.rhcloud.com:8000/', {...