Will be an app that allows you to see where fruit (or nut) trees are located. It will also allow the user to tag new trees in the system.
The scope is meant to be minimal. There will be no 'admin' interface, no accounts, and no editing of content. Anyone can add new trees.
- git
- nodejs
- Mobile App:
- Web Server:
- MySQL - installation instructions will vary based on your operating system
Before continuing, be sure to download and install the project requirements.
The project has two parts:
- A mobile app which uses Cordova to build our web app for Android, iOS, and browsers.
- A web server which provides a web API for the mobile app. It stores the tree data and images.
To get the project files and start working locally, you must first "clone" the project:
git clone https://github.com/Learn-by-doing/hobobar.git
Below are all the commands that you will need to get the mobile app running locally:
cd hobobar/app
npm install -g cordova grunt-cli
npm install
grunt
cordova platform add browser
cordova run browser
- Note that Google Chrome is required to run the app with
cordova run browser
. - Run
cordova platform add ios
to add iOS platform. Then run the app withcordova emulate iOS
. This requires XCode. - You can also run
cordova platform add android
to add Android. This requires Android SDK.
If you have the error Error executing "google-chrome --user-data-dir=/tmp/temp_chrome_user_data_dir_for_cordova http://localhost:8000/index.html": /bin/sh: 1: google-chrome: not found
you can use the command below to run with Chromium instead of Chrome:
cordova run browser -- --target=Chromium
You will need MySQL to run the server.
Once you have MySQL installed, you will need to setup the local database. Run the following SQL queries to create the database and user:
CREATE DATABASE IF NOT EXISTS hobobar_local;
GRANT USAGE ON * . * TO 'hobobar_local'@'localhost' IDENTIFIED BY 'password' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
GRANT ALL PRIVILEGES ON `hobobar_local` . * TO 'hobobar_local'@'localhost';
Below are the commands you will need to get the web server running locally:
cd hobobar/server
npm install
npm start