Questions tagged [perfect]

Perfect is a framework for developing web and other REST services in the Swift programming language. It lets developers build using only Swift to program both the client-facing and server-side of their projects.

enter image description here

Perfect is the first enterprise-grade web server and toolkit designed exclusively for developers using Apple’s open source programming language, . Perfect eliminates the need for developers to choose and learn an additional programming language to program backend server software. Perfect runs on iOS, MacOS, and Linux.

129 questions
0
votes
2 answers

SSL redirect changes client IP address read from HTTPResponse

I am using Perfect Framework for my server side application running on an AWS EC2 instance. I am using the following code to get client IP address. open static func someapi(request: HTTPRequest, _ response: HTTPResponse) { var clientIP =…
bisikli
  • 19
  • 2
0
votes
1 answer

Perfect-MySQL majorVersion:3 Undefined symbols for architecture x86_64:

I get an ld: symbol(s) not found for architecture x86_64 error while building from terminal (swift build) (swift 4). It points to a simple init in my code like: let mysql = MySQL() Two hints: Clue#1: I am not having any problem building in…
bisikli
  • 19
  • 2
0
votes
2 answers

Command 'swift build' - infinity building

I've downloaded example project from this http://perfect.org/docs/gettingStarted.html and commands, swift build and next swift package generate-xcodeproj working great. Than I want to add another package to Package.swift file, for example…
edzio27
  • 4,126
  • 7
  • 33
  • 48
0
votes
1 answer

How to deal with Parsing Object from Join Query

I'm currently working on my first API with the Perfect framework. It's been a while since I made an API myself so I must admit my SQL and API logic is a little rusty. I'm using a MySQL database for my implementation. For sake of example I'll explain…
NoSixties
  • 2,443
  • 2
  • 28
  • 65
0
votes
1 answer

Parse with Perfect CURL Swift

I've been trying to make a server side Swift program which downloads the JSON data from Parse using Parse's cURL call. For this to work, I need to use a package for Swift called "Perfect cURL" which works on server side swift. I am unable to…
Johno2110
  • 1,071
  • 1
  • 13
  • 25
0
votes
1 answer

value of type 'Scanner' has no member 'scanHexInt32'

When I compile my Swift project for Mac it compiles fine but when I compile same code in Ubuntu 16.04 I get following error. value of type 'Scanner' has no member 'scanHexInt32' if Scanner(string: self).scanHexInt32(&value) { …
Shafraz Buhary
  • 643
  • 6
  • 14
0
votes
1 answer

With Perfect/Swift mySQL Must You Have a Single Database Connection Per Request?

With Perfect/mySQL (https://github.com/PerfectlySoft/Perfect-MySQL), the examples I've seen suggest that you cannot reuse a single database connection across multiple connections. That is, you need a single database connection per HTTP request.…
Chris Prince
  • 7,288
  • 2
  • 48
  • 66
0
votes
1 answer

Using 'Any' and 'AnyObject' types in Swift Linux gives errors

I have this line of code: produceJSONMessage(message: message as AnyObject) That works ok in XCode (Mac). However building it in linux using swift build produces an error: /home/ubuntu/x/x/objects.swift:x:x: error: 'Any' is not convertible to…
Tyress
  • 3,573
  • 2
  • 22
  • 45
0
votes
2 answers

Server Side Swift with Perfect authentication and routes

I have server side swift project that is setup to upload files. And I am attempting to authentication to the project so that the files can only be accessed with a valid login. main.swift import PerfectLib import PerfectHTTP import…
MwcsMac
  • 6,810
  • 5
  • 32
  • 52
0
votes
1 answer

Swift Perfect compile command failed for linux environment

I'm trying to create on Swift Perfect project. I'm trying to send one response for a link. My class looks as follows class Model: JSONConvertibleObject { static let registerName = "prospect" var userEmail = "" var authToken = "" …
Vikas B L
  • 397
  • 1
  • 10
0
votes
1 answer

Does throwing a asynchronous function make it synchronous in Swift?

This is a code example taken from Perfect Swift PostgresSTORM library. do{ //Create a user object let obj = User() obj.name = "someUser" //Save it to db try obj.save({ id in print(2..) obj.id = id…
rajeeva9
  • 139
  • 12
0
votes
1 answer

Missing libraries/modules from Perfect framework on Linux

I am a newbie learning how to code in Swift on Linux. Right now I am trying to use Perfect framework so I can create th REST service (or something like that) I am following instructions in…
Bodeue
  • 47
  • 1
  • 8
0
votes
1 answer

no such module 'PerfectLib'

I am trying to create a REST service and I am watching this tutorial: https://videos.raywenderlich.com/courses/77-server-side-swift-with-perfect/lessons/1 for the Perfect framework and I am stuck because (moment in the tutorial video time~2:31)…
Bodeue
  • 47
  • 1
  • 8
0
votes
1 answer

How to Cancel/Remove Redirecting the Client with Server side swift in perfect framework

In My Serverside swift demo, I have Redirecting to the Client. It's moved permenantly. How can I cancel redirection. I have used below code to redirect request. response.status = .movedPermanently response.setHeader(.location, value:…
Vvk
  • 4,031
  • 29
  • 51
0
votes
2 answers

Perfect Assistant not working

Working with Perfect Assistant but not able to create new project getting error as below screenshot Can anyone help me to solve this.
Shital
  • 159
  • 1
  • 1
  • 8
1 2 3
8 9