main.swift 378 B

1234567891011121314151617
  1. //
  2. // main.swift
  3. // SwifterOSX
  4. // Copyright (c) 2015 Damian Kołakowski. All rights reserved.
  5. //
  6. import Foundation
  7. let server = swiftyDemoServer(NSBundle.mainBundle().resourcePath!)
  8. do {
  9. try server.start(9080)
  10. print("Server has started ( port = 9080 ). Try to connect now...")
  11. NSRunLoop.mainRunLoop().run()
  12. } catch {
  13. print("Server start error: \(error)")
  14. }