Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Emergency Beacon App
- ## To install locally
- ### Drupal server
- Set up a local server, like [XAMPP](https://www.apachefriends.org/index.html) that uses
- PHP5 and MySql (or Maria-DB).
- Clone this repository and put it in the directory that your srver serves from.
- When you go to the homepage (probably http://localhost), you will see an error
- because the database is not configured.
- Configure your database (if you're using XAMPP you can use PHPMyAdmin, probably at http://localhost/phpmyadmin) to add the following credentials:
- ```
- database name: admin_beacon
- username: beaconsite
- password: pPrq42&6
- host: localhost
- ```
- ### Mobile app
- The mobile app will be installed by default to beacon/mobile.
- You can view it on your web browser, but it will not appear properly until you use the [Ripple emulator](https://chrome.google.com/webstore/detail/ripple-emulator-beta/geelfhphabnejjhdalkjhgipohgpdnoc?hl=en)
- and run it in Phonegap mode. If you're running the app from localhost, you'll also
- need to handle Cross Origin Resource Sharing (CORS). I use [this](https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi?hl=en) extension. Check
- the javascript console (F12 in Chrome) to see if your Cross-Origin request is being denied.
- By default, the app will connect to the Drupal server at beacon.isodevelopers.com, even if you're hosting the app locally.
- To change this and connect to your local drupal install, edit the ``` Drupal.settings.site_path ``` variable in beacon/mobile/app/settings.js.
- Note that if you change this value to ``` localhost ``` the app will work in your browser but not on a phone. To make it connect to your local
- Drupal server on a phone, set the value to your local IP address (provided that your phone is connected to the same network as your local server).
- ## Dev Guide
- ### Drupal
- The Drupal site is the backend. It handles:
- * Authentication (People) *Note: everything below this line is not yet implemented.*
- * Storing Plans (Structure -> content types -> plan)
- * Storing Groups (Structure -> content types -> group)
- * Adding users to groups
- * Receiving the information from activated emergency beacons and storing it
- * Dispensing push notifications when a beacon is activated
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement