Install important stuff: From within the root directory:
- npm install in /
- npm install in /mobile
To get server properly connected:
In the root directory:
-
heroku login
-
heroku create
-
heroku git:remote -a
-
git push heroku master
-
wait until done... your server will be hosted on something along the lines of: https://.herokuapp.com or in our case https://mealdotnext4.herokuapp.com
-
This url will be used to do request from client/mobile side.
To get the mongoDB wired up, if you don't want go google (hosted using mlab):
-
Go to https://mlab.com/
-
Create an account
-
Click create new MongoDB Deployment
-
Single-node sandbox (free 0.5GB one), add relevant info, create
-
Click on your new database
-
Go to users tab and add database user. Create user/pass
-
Look for the url under
To connect using a driver via the standard MongoDB URI (what's this?):
E.g mongodb://:@ds031167.mlab.com:31167/mealdotnext
-
Go to /server/config/connection.js
-
Fill in relevant information to the variables (mongoUser, mongoPassword, mongoURI)
-
Done.
Get access to Edamam API
- https://developer.edamam.com/
- Create free account
- Go to /server/config/config.js and put in your stuff.
Endpoints
- Read and understand what endpoints there are and what they do by going to api_documentation.md
- Note that you will need to be authenticated to access most of them. Or you can go to /server/config/routes.js and remove isAuthenticated if you just want to test stuff out. Do this also for /server/config/routers/users.js
Getting started on react native
- Go to mobile/app/ Addmeal.js and MealList.js and change
- https://github.com/exponentjs/xde
- Install for whichever environment
- Run program
- Project -> open project-> mobile folder of this directory