Skip to content

Latest commit

 

History

History
77 lines (47 loc) · 1.29 KB

README.md

File metadata and controls

77 lines (47 loc) · 1.29 KB

ZWeatherServer

Logo

Build Status

A weather server based on Vapor written by Swift

Current Environment

OS: macOS or Ubuntu

Database: MySQL

Framework: Vapor v1.0+

Weather Data Source

OpenWeatherMap

Begin

Install MySQL

macOS

brew install mysql
brew link mysql
mysql.server start

Linux

sudo apt-get update
sudo apt-get install -y mysql-server libmysqlclient-dev
sudo mysql_install_db
sudo service mysql start

MySQL Script

source <project path>/Script/zweather_mysql_script.sql

Building

cd <project path>/ZWeatherServer

macOS

swift build -Xswiftc -I/usr/local/include/mysql -Xlinker -L/usr/local/lib

Linux

swift build -Xswiftc -DNOJSON

API

Doc

Online Demo

For example: