Questions tagged [vapor]

A web framework and server for Swift that works on macOS and Linux.

Vapor Logo

Created in early 2016, Vapor is a powerful Swift web framework that is designed to make development, faster, safer, and more fun. You can use it to create modern web apps, sites, and APIs using HTTP or real-time apps using WebSockets. It's nearly 100x faster than popular web frameworks using Ruby and PHP. The static type system allows you to write less and do more, making Vapor apps very concise and even more powerful. Using Xcode on Mac platforms with autocomplete, debugging, and breakpoints you'll spend more time creating and less time fixing. With Swift now being open source, it is possible to develop Vapor apps for deployment on Linux platforms, including Raspberry Pi.

WebsiteSlackGithub

724 questions
405
votes
39 answers

dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib

I installed vapor via homebrew and then immediately wanted to jump into a project by executing vapor new Hello but then got the following message back in the terminal: dyld: Library not loaded:…
Cronay
  • 4,237
  • 2
  • 9
  • 16
35
votes
1 answer

Swift: What does backslash dot "\." mean?

I'm new to backend Swift and thought I'd use Vapor to get up-and-running on a side project fast... I ran vapor new WebServer --template=auth-template, and now I'm trying to figure out what something like return \.email means. For more context, I'm…
user3773048
  • 4,123
  • 3
  • 14
  • 21
29
votes
2 answers

vapor: Address already in use (errno: 98)

I deployed my vapor project to Ubuntu. And made the configuration of supervisor and Nginx. When I invoke my server. first call is success but When I try second call I get 502 bad gateway error from browser. When I check error log, the error is…
sof98789
  • 911
  • 10
  • 16
20
votes
0 answers

FluentMySQL connection using Unix Socket

I'm following the Getting started section for the MySQL package on the Vapor Documentation, which I'm able to follow step by step and, as a result, I have successfully established a connection to the MySQL database, using custom database credentials…
Orlando
  • 1,417
  • 2
  • 17
  • 27
18
votes
3 answers

How to serve static files using Vapor?

I'm trying to write server side application using Swift and Vapor framework. However, I can't figure out, how to serve static files using Vapor. It's not enough to just move them to the Public or Resources directory. How can I do that? UPD. I…
Alexander Doloz
  • 3,512
  • 1
  • 16
  • 32
16
votes
2 answers

Could not bind to 0.0.0.0:8080, it may be in use or require sudo

Sometimes I get this error when trying to run a Vapor application from Xcode. Reopening Xcode doesn't help, only restarting of system do. Is it a bug of the framework? What should I do to prevent this?
Alexander Doloz
  • 3,512
  • 1
  • 16
  • 32
15
votes
3 answers

Can't access FireBase Database via HTTP/REST error 403 Forbidden

Swift + Vapor framework for server + Xcode 8.1 I am trying to read Firebase Realtime Database making HTTP requests to my DB, but I get permission denied. These are the steps: 1. create JWT sign it with secret key downloaded from…
bibscy
  • 2,132
  • 1
  • 19
  • 61
14
votes
10 answers

Changing hostname and port with Vapor 3

The Config/server.json file doesn't seem to be read by Vapor 3, and as such I can't configure the hostname and port that a Vapor 3 app binds to. Does Vapor 3 have a different method for this?
Adam Young
  • 1,177
  • 7
  • 16
14
votes
2 answers

Integrating Vapor and React

I'm building a classic database backed, dynamic website, that will allow users to share leads. I'm a little old school, and want to implement my system using a pure MVC architecture. I'm considering using React in a pure 'V' mode, with Vapor…
Philip Pegden
  • 805
  • 5
  • 21
13
votes
1 answer

How to access query parameters in vapor 3

Basically the title. I want to know how to use url query parameters in Vapor 3. I can't seem to find anything in the docs on it. e.g. /objects?fancy=true, how do I access the fancy parameter.
Jack Maloney
  • 458
  • 1
  • 5
  • 18
13
votes
2 answers

'String' does not conform to expected type 'CVarArg'

When I'm trying to log using NSLog, I'm facing this error: remote: /tmp/build_f459d376d1bc10ac2e93e52575ac5ea9/Sources/App/main.swift:368:49: error: argument type 'String' does not conform to expected type 'CVarArg' remote: …
O-mkar
  • 4,575
  • 5
  • 32
  • 56
12
votes
2 answers

vapor toolbox broken after upgrading swift

Vapor toolbox is crashing when trying to use it after upgrading to Swift 3.1. dyld: lazy symbol binding failed: Symbol not found: __TTSfq4n_s___TFVSS13CharacterView38_measureExtendedGraphemeClusterForwardfT4fromVVSS17UnicodeScalarView5Index_Si …
tanner0101
  • 3,907
  • 17
  • 33
12
votes
2 answers

openssl / ctls trouble with vapor 2

How can I fix these OpenSSL / TLS issues I'm getting with Vapor 2? They are preventing me from compiling my project on the command line and in Xcode. During SPM build: note: you may be able to install ctls using your system-packager: brew…
tanner0101
  • 3,907
  • 17
  • 33
10
votes
3 answers

Image Upload in Vapor 3 using PostgreSQL

I'm following this guys Martin Lasek Tutorials and now i'm at "image upload". It seems that no one has the answer to the question "How do you upload images i Vapor 3" Db connection is ok, all the other values are saved. This is mye create method: …
Krister Moen
  • 403
  • 2
  • 12
10
votes
1 answer

swift build error on ubuntu 15.10

I am trying to install vapor (https://github.com/vapor/vapor) toolbox on a server which is running Ubuntu 15.10 x64. I am getting this error from the "swift build" command /swift-3.0/usr/bin/swift-build: error while loading shared libraries: …
J. R. MacMillian
  • 566
  • 4
  • 13
1
2 3
48 49