Skip to content

CaryZheng/ZWeatherServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

About

A weather server based on Vapor written by Swift

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages