Skip to content

Instantly share code, notes, and snippets.

@kidcodely
Created December 2, 2017 18:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kidcodely/3c9927161b85d89f94fa1e1e556e650f to your computer and use it in GitHub Desktop.
Save kidcodely/3c9927161b85d89f94fa1e1e556e650f to your computer and use it in GitHub Desktop.
Main swift file of our server side project
import PerfectLib
import PerfectHTTP
import PerfectHTTPServer
import PerfectMySQL
import Foundation
// You'll need to update these values based on how you've set up MySQL.
let host = "127.0.0.1"
let user = "root"
let password = "admin"
let database = "nintendo"
let mysql = DB()
mysql.databaseConnect(host: host, user: user, password: password, db: database)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment