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
24
votes
3 answers

Load balancing sockets on a horizontally scaling WebSocket server?

Every few months when thinking through a personal project that involves sockets I find myself having the question of "How would you properly load balance sockets on a dynamic horizontally scaling WebSocket server?" I understand the theory behind…
spierce7
  • 14,797
  • 13
  • 65
  • 106
9
votes
5 answers

How to make a new Perfect Project from scratch (Swift server) in xcode?

Perfect is a new Swift Framework for creating a web/http server in swift. The documentation is not there yet and I find trouble with building a new project from scratch. I don't know which frameworks are necessary to import and which one is the…
7
votes
1 answer

Swift - Vapor Using HTML

I recently made the switch from Perfect to Vapor.In Perfect you could do something like this without using a html file. routes.add(method: .get, uri: "/", handler: { request, response in response.setHeader(.contentType, value: "text/html") …
James Ikeler
  • 111
  • 9
7
votes
6 answers

How to get path of root directory of your project folder in Perfect 2.0?

As you know for server side swift Perfect 2.0 framework is out. I was trying to get path for root directory but didn't have any luck yet. Snippet 1 let fileDir = Dir("/Resources/fileuploads") print(fileDir.path) this code give me path as…
Pawan Joshi
  • 1,581
  • 3
  • 20
  • 40
7
votes
2 answers

Xcode build Perfect failure -- COpenSSL not found

Xcode: 8.0 Swift toolchain: 3.0 release Perfect: .Package(url:"https://github.com/PerfectlySoft/Perfect-HTTPServer.git", majorVersion: 2, minor: 0), There is fine to run swift build in terminal. But I'm run swift package generate-xcodeproj and open…
eason
  • 2,854
  • 3
  • 16
  • 18
7
votes
1 answer

Using perfectLib error ''ld: library not found for -lCOpenSSL for architecture x86_64"

Here is some images showing the problem.
jhd
  • 1,243
  • 9
  • 21
6
votes
2 answers

swift server side server socket error

I'm suffering from server problem on both perfect and vapor .. The server working for only one time , and once after i update the project and rebuild it, the server response does not update any more. I got this error ... from vapor in Xcode No…
mercury
  • 2,390
  • 3
  • 30
  • 39
5
votes
2 answers

Amazon AWS SDK using Swift and Perfect?

Is it possible to leverage the Amazon Web Services SDK for iOS in a server-side Swift app developed using the Perfect framework? I'd like to be able to deploy my Perfect app to AWS and make calls to DynamoDB, S3, etc. from the app. However, I…
Shadowman
  • 11,150
  • 19
  • 100
  • 198
5
votes
0 answers

For homebrew mysql installs, how to fix mysql.sock path?

I am on macOS 10.12.3. Installed and running MySQL through Homebrew. Whenever i try to start MySQL with brew services start mysql or sudo mysql.server start command on terminal, it starts. Following is my my.cnf file residing into…
Partho Biswas
  • 2,290
  • 1
  • 24
  • 39
5
votes
1 answer

swift perfect project build get failed when adding PostgresStORM package

im using Xcode 8.2.1 and also my swift version is 3.0.2 (swiftlang-800.0.63 clang-800.0.42.1) and here is my package.swift contents import PackageDescription let package = Package( name: "MyAwesomeProject", dependencies: [ …
Mohammadalijf
  • 1,387
  • 9
  • 19
5
votes
3 answers

/usr/bin/ld: cannot find -lstdc++ for Ubuntu while trying to "swift build" Perfect2 project

Description: I've followed the installation steps for Swift3 and Perfect2 and I've cloned the PerfectTemplate test project proposed by Perfect and I've tried swift build Error Message: warning: minimum recommended clang is version 3.6, otherwise…
kemicofa ghost
  • 16,349
  • 8
  • 82
  • 131
4
votes
2 answers

Cannot invoke 'reduce' with an argument list of type '(String, (String) -> String)'

I am trying to convert Swift 3 to Swift 4 for a repo on github. Here is a function that blocks me. func times(_ n: Int) -> String { return (0..
user8812816
4
votes
2 answers

Role Based Access Authorization in perfect

Being new to perfect server side swift, I cannot find any packages that help with role based access authorization. In Spring there is for example, .antMatchers("/homePage").access("hasRole('ROLE_USER') or…
GAllan
  • 409
  • 4
  • 11
4
votes
1 answer

PerfectSwift: Can't compile PerfectCrypto

I'm using PerfectSwift on Ubuntu 14.04.1, clang-3.8 I was using Perfect and all was working, but now, I can't compile anymore ( but it compiles on my mac ) Error log is…
CZ54
  • 5,488
  • 1
  • 24
  • 39
4
votes
1 answer

Swift 3 Linux with Perfect: Add a scheduled timer with interval to the runLoop

I'm trying to make an application in Swift on my Ubuntu (Ubuntu 15.10 wily, Swift swift-3.0.1-RELEASE) using the Perfect library. I would like to have a function called every X second. For that, I'm using the Timer class of the Foundation…
Aurelien Maigret
  • 402
  • 3
  • 12
1
2 3
8 9