Advertisement
Guest User

Untitled

a guest
Apr 19th, 2016
458
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.28 KB | None | 0 0
  1. # Emergency Beacon App
  2.  
  3. ## To install locally
  4.  
  5. ### Drupal server
  6.  
  7. Set up a local server, like [XAMPP](https://www.apachefriends.org/index.html) that uses
  8. PHP5 and MySql (or Maria-DB).
  9.  
  10. Clone this repository and put it in the directory that your srver serves from.
  11.  
  12. When you go to the homepage (probably http://localhost), you will see an error
  13. because the database is not configured.
  14.  
  15. Configure your database (if you're using XAMPP you can use PHPMyAdmin, probably at http://localhost/phpmyadmin) to add the following credentials:
  16.  
  17. ```
  18. database name: admin_beacon
  19. username: beaconsite
  20. password: pPrq42&6
  21. host: localhost
  22. ```
  23. ### Mobile app
  24.  
  25. The mobile app will be installed by default to beacon/mobile.
  26. 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)
  27. and run it in Phonegap mode. If you're running the app from localhost, you'll also
  28. 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
  29. the javascript console (F12 in Chrome) to see if your Cross-Origin request is being denied.
  30.  
  31. By default, the app will connect to the Drupal server at beacon.isodevelopers.com, even if you're hosting the app locally.
  32. To change this and connect to your local drupal install, edit the ``` Drupal.settings.site_path ``` variable in beacon/mobile/app/settings.js.
  33. 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
  34. 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).
  35.  
  36. ## Dev Guide
  37.  
  38. ### Drupal
  39.  
  40. The Drupal site is the backend. It handles:
  41. * Authentication (People) *Note: everything below this line is not yet implemented.*
  42. * Storing Plans (Structure -> content types -> plan)
  43. * Storing Groups (Structure -> content types -> group)
  44. * Adding users to groups
  45. * Receiving the information from activated emergency beacons and storing it
  46. * Dispensing push notifications when a beacon is activated
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement