- Added section on configuration to README.md

- Made the application more configurable by the user
- Made installation easier
- API location is now dynamic based on window.location
- Cleaned up some older code that was pointing to dev stuff
- Now includes the SQL-table required to run the application
- Application now exposes config to console for easier debugging
- Search now supports user specified table name
- Updated the OpenFlights airport data file source
This commit is contained in:
Ismo Vuorinen
2013-11-19 15:34:42 +02:00
parent 787abf7062
commit b0258437cd
8 changed files with 158 additions and 62 deletions

View File

@@ -31,6 +31,19 @@ grunt server # Start development server
grunt # Build minified and optimized version for release to /dist -folder
```
### Configuration ###
1. Configure database access in ``app/api/config.sample.php`` and save as ``app/api/config.php``. The ``config.php`` file gets ignored in ``.gitignore`` so no worries.
2. Build project using ``grunt``, this generates ``dist`` folder
3. Push files and folders in ``dist/*`` to your server, for example as **http://example.com/lentolaskuri**
4. Set up MySQL database table to your server and import airport data to your database:
- Visit **http://example.com/lentolaskuri/api/import.php** to create mysql table automagically (or import ``app/api/lentolaskuri.sql`` by hand, but change table name to one you used in ``config.php``)
- Change variable ``$config['create_table']`` to ``false`` in ``app/api/config.php`` to prevent further table creation attempts
- ProTip: You can make ``cron`` or similar visit this url weekly to update the latest airport data from openflights database
6. Test your lentolaskuri application
7. Donate money based on emissions to a good cause
## Credits ##
- Build by [Juho Teperi](https://github.com/Deraen) in 2013 while working for [Ekokumppanit Oy](http://www.ekokumppanit.fi)