TinyFaces:采用 Swift 快速构建一个可随机使用的头像数据库及服务端

778 阅读1分钟
原文链接: github.com

Avatars & Random data for your designs

Also check out TinyFaces Sketch Plugin

:robot: Before building (dependencies)

macOS:

  • Run brew install gd
  • Run brew install mysql followed by mysql_secure_installation to setup a database
  • Install Xcode
  • Run vapor xcode, this will create the Xcode project

Ubuntu (server):

  • Run sudo apt-get install libgd-dev
  • Run apt-get install libmysqlclient-dev

Database:

  • Create a MySQL database called marvel_faces, e.g. using the mysql CLI: CREATE DATABASE marvel_faces;
  • Config/mysql.json contains the database credentials

:construction: Building

macOS:

  • Run the App target in Xcode
  • TinyFaces should now be running on http://localhost:8080
  • First time run http://localhost:8080/seed/ to seed the database tables with default data.

:book: Documentation

Visit the Vapor web framework's documentation for instructions on how to use this package.

:droplet: Community

Join the welcoming community of fellow Vapor developers in Slack.

:wrench: Compatibility

This package has been tested on macOS and Ubuntu.