AirLook项目包括前端 iOS App Air Look 和服务端。 这是空气看看项目的服务端。 是一个使用Phalcon框架的多模块项目,包括了三个模块:
CLI用来刷新空气质量数据,后台使用API提供给前端使用的APIAdmin后台管理模块,供管理员使用(仅搭建模块结构)
- localhost/AirLook/setting/newToken/token
- localhost/AirLook/setting/changeStationID/3303/token
- localhost/AirLook/setting/changeAlertLevel/2/token
- localhost/AirLook/setting/changeRecoveryEnabled/false/token
- localhost/AirLook/airdata/id/3303
- localhost/AirLook/airdata/location/latitude;longitude
- localhost/AirLook/nearest/id/3303
- localhost/AirLook/search/city/shanghai
注意Linux系统是否大小写敏感
To run this application on your machine, you need at least:
- PHP >= 7.2
- Phalcon >= 4.0
- MySQL >= 5.5
- Apache Web Server with
mod_rewrite enabled, andAllowOverride Options(orAll) in yourhttpd.confor Nginx Web Server
- Copy project to local environment
- Copy file
cp .env.example .env - Edit .env file with your DB connection information & mail sent information & aqi token
- Create DB -
airlook/db/schema.sql - Install Composer -
curl -s http://getcomposer.org/installer | php - Installing Dependencies via Composer -
composer install - Set write permission -
airlook/public/logs airlook/public/task - Install your Apple Push Cetifications -
airlook/public/certificates/airalert.pem - Modify Linux crontab -
airlook/bin/crontab - Get your aqi Token from -
https://aqicn.org/data-platform/token/