vapor Questions

2

Solved

I want to connect a web server to my ios application with swift. So I created a function to create a task with "POST" but when I call it, I get an error message : nw_socket_handle_socket...
Becky asked 28/6, 2020 at 20:4

11

Solved

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?
Clapp asked 25/1, 2018 at 19:10

43

Solved

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: /u...
Wages asked 23/11, 2019 at 10:21

2

Solved

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 somethin...
Mayor asked 27/9, 2018 at 18:58

4

Solved

Although there used to be some methods to get client IP address (e.g. req.peerHostname ), I cannot figure out how to get it in Vapor 3.0. Could anyone please let me know how to get client IP addre...
Ashok asked 24/5, 2018 at 6:1

2

Solved

I run a website that handles large files (uploads and downloads). Currently I am transitioning the site from Perfect to Vapor. In Perfect, it is relatively simple to stream a file to users, and the...
Disquiet asked 24/2, 2021 at 22:13

1

I try to upload gif to AWS S3. URL is presigned. For presign I use Vapor for sending image it happens from React. Here docs says: https://soto.codes/2020/12/presigned-urls.html If you want to incl...
Stagger asked 14/7, 2022 at 10:38

2

We are using Vapor to deploy our Laravel App to AWS Lambda. After small change (10 lines were introduced), the deploy process via GitHub action fails with the following message: Message: Your appli...
Lilybelle asked 29/6, 2020 at 13:19

2

I want to configure Package.swift so that one target would be an extension to another, both of them should share the same code from the one folder, but for the "extended" version there is an additi...
Rancid asked 8/1, 2020 at 19:34

2

I created a Swift Package Manager library, and deployed it on my GitLab with a tag number 0.1.0. I'm now trying to add this package to my new vapor project by adding: .package(url: "http://mygit.g...
Alvar asked 24/6, 2019 at 8:5

3

I need to create a complex html-table inside a Swift Vapor App. Problem is: Leaf doesn't seem to support counting up variables like #(somevar += 1) nor concatenating string variables like #(someva...
Atavistic asked 13/6, 2017 at 14:27

2

Solved

I'm trying to build a very simple service using Vapor. It depends on websockets, and I establish a connection between an iOS device in simulator and vapor running on localhost. When I want to make ...
Kingdom asked 2/2, 2021 at 4:49

0

I got this error when sending email with Amazon SES: BadRequestException: Unable to parse template data (invalid JSON). When creating the template it does not raise any error: aws ses create-templ...
Lewiss asked 20/8, 2021 at 16:33

1

Solved

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 t...
Ditmore asked 30/8, 2018 at 2:17

3

I'm trying to connect to my Heroku PostgreSQL database but I have the following error : cannotEstablishConnection("FATAL: no pg_hba.conf entry for host \"37.167.93.189\", user \"clpnkpyttmdtyq\",...
Northey asked 20/12, 2016 at 15:4

5

Solved

I want to write some integration tests for Vapor 3 server and I need to have clean Postgre database each time I run my tests. How can I achieve this? It seems migrations isn't the right way to go a...
Papule asked 19/11, 2018 at 20:12

1

Solved

This puzzles me: I have a model in which I want to use an enum. I first declare the enum: enum MenuChoices: String, Codable { case reachableAt case attentionTo case reasonVisit case reasonProbl...
Cal asked 3/12, 2020 at 12:43

4

Solved

In Vapor 3 you could use filter method with a SQLiteBinaryOperator, so you could create a query with a like operator. I'm trying to do the exact same thing in Vapor 4 but couldn't find anything for...
Bellied asked 25/8, 2020 at 17:9

2

Solved

How do I add a default value for a non-optional field in a fluent migration? I currently have this error: ⚠️ PostgreSQL Error: column "firstName" contains null values my only options are public...
Saddleback asked 27/8, 2019 at 13:48

1

Solved

In one of my routes, I want to fetch HTML from a different site. https://docs.vapor.codes/4.0/content/ documents support for JSON and such but I couldn't find anything on raw HTML. request.client.g...
Centering asked 2/9, 2020 at 10:13

1

Solved

I am currently implementing a Vapor 4 application, which will be used to manage machines. The user should be able to search for a machine name, which I accomplished by .filter(Machine.path(for: \Ma...
Nivernais asked 28/8, 2020 at 12:50

3

Solved

I want to generate a secure random number to use for bearer tokens in vapor swift. I have looked at OpenCrypto but it doesn't seem to be able to generate random numbers. How do I do this?
Reglet asked 27/8, 2020 at 13:6

2

Solved

I am trying to migrate some code using a Repository pattern from Vapor 3 to Vapor 4. I have gone through the documentation of this specific pattern from the Vapor 4 documentation, and I think I und...
Kindliness asked 10/8, 2020 at 1:49

2

Solved

so I have models names Organization, User, and App. Apps and Users both belong to organizations. final class Organization: Model, Content { static let schema = "organizations" @ID(key:...
Ankylostomiasis asked 3/8, 2020 at 18:7

1

I have a local dependency in my Package.swift in the form of .package(url: "file:///Users/User/Documents/.../my-dependency", .branch("master")), The local dependency is under development. I wis...
Goldie asked 7/6, 2020 at 6:28

© 2022 - 2025 — McMap. All rights reserved.