# Server Side Swift with Vapor

**URL:** https://forums.kodeco.com/c/books/server-side-swift-vapor/36.md?page=9

[Latest](https://forums.kodeco.com/latest.md) · [Categories](https://forums.kodeco.com/categories.md) · [Tags](https://forums.kodeco.com/tags.md)

**Page:** 10

---

## [Error installing vapor on a new mac](https://forums.kodeco.com/t/error-installing-vapor-on-a-new-mac/58210)

<div class="topic-metadata">

**Author:** [@arnold\_74](https://forums.kodeco.com/u/arnold_74)\
**Replies:** 2\
**Last updated:** [December 23, 2018, 12:10pm UTC](https://forums.kodeco.com/t/error-installing-vapor-on-a-new-mac/58210 "2018-12-23T12:10:05Z")

</div>

I was trying to install vapor on my new mac, but I got always an error, perhaps somebody can give me some hint to solve it: Here the error: curl: (35) LibreSSL SSL\_connect: SSL\_ERROR\_SYSCALL in connection to github.com…

---

## [Where can i find the source code of the book](https://forums.kodeco.com/t/where-can-i-find-the-source-code-of-the-book/58032)

<div class="topic-metadata">

**Author:** [@arnold\_74](https://forums.kodeco.com/u/arnold_74)\
**Replies:** 5\
**Last updated:** [December 22, 2018, 3:59pm UTC](https://forums.kodeco.com/t/where-can-i-find-the-source-code-of-the-book/58032 "2018-12-22T15:59:33Z")

</div>

I bought the book and now I am on chapter 12 and I would like download the source code but I can not find it under the url written in the book https://store.raywenderlich.com/products/server-side-swift-with-vapor-source…

---

## [How to invoke another REST Service from Vapor 3](https://forums.kodeco.com/t/how-to-invoke-another-rest-service-from-vapor-3/58133)

<div class="topic-metadata">

**Author:** [@saiy](https://forums.kodeco.com/u/saiy)\
**Replies:** 1\
**Last updated:** [December 21, 2018, 1:35pm UTC](https://forums.kodeco.com/t/how-to-invoke-another-rest-service-from-vapor-3/58133 "2018-12-21T13:35:42Z")

</div>

I am coming up to speed on vapor and I started with Vapor 3 directly, Thanks to TIM’s videos. However My requirement is to invoke a REST service from Vapor 3, and my study shows that droplet is what served the purpose i…

---

## [Had trouble deploying to Vapor Cloud](https://forums.kodeco.com/t/had-trouble-deploying-to-vapor-cloud/53702)

<div class="topic-metadata">

**Author:** [@wayne0714](https://forums.kodeco.com/u/wayne0714)\
**Replies:** 3\
**Last updated:** [December 20, 2018, 6:14am UTC](https://forums.kodeco.com/t/had-trouble-deploying-to-vapor-cloud/53702 "2018-12-20T06:14:42Z")

</div>

Hi I had a bit of trouble deploying the TIL app in Chapter 5 and I was hoping if you (the authors) would include a few tips on how to set up Git first because it turns out that my problem stemmed from not having set up …

---

## [Chapter 6: PostgreSQL - Thread 1: Fatal error: Error raised at top level:](https://forums.kodeco.com/t/chapter-6-postgresql-thread-1-fatal-error-error-raised-at-top-level/57273)

<div class="topic-metadata">

**Author:** [@hcastellanos22](https://forums.kodeco.com/u/hcastellanos22)\
**Replies:** 4\
**Last updated:** [December 16, 2018, 9:15pm UTC](https://forums.kodeco.com/t/chapter-6-postgresql-thread-1-fatal-error-error-raised-at-top-level/57273 "2018-12-16T21:15:45Z")

</div>

:cry::cry::cry::cry::cry: I get this error. SQLite and MySQL sections worked fine. The problem is only in the PostgreSQL. Page 90. Make sure you have the Run scheme selected with the deployment target My Mac, then buil…

---

## [Chapter 2: Code from book page 34 has compile error](https://forums.kodeco.com/t/chapter-2-code-from-book-page-34-has-compile-error/55116)

<div class="topic-metadata">

**Author:** [@blakninja](https://forums.kodeco.com/u/blakninja)\
**Replies:** 3\
**Last updated:** [December 16, 2018, 9:14pm UTC](https://forums.kodeco.com/t/chapter-2-code-from-book-page-34-has-compile-error/55116 "2018-12-16T21:14:14Z")

</div>

router.get("hello", String.parameter) { req in let name = try req.parameters.next(String.self) return "Hello, \\(name)!" } The code above gives this compile error for router.get: "Type ‘PathComponentsRep…

---

## [Pagination with Fluent](https://forums.kodeco.com/t/pagination-with-fluent/56071)

<div class="topic-metadata">

**Author:** [@pyae](https://forums.kodeco.com/u/pyae)\
**Replies:** 6\
**Last updated:** [December 16, 2018, 9:12pm UTC](https://forums.kodeco.com/t/pagination-with-fluent/56071 "2018-12-16T21:12:58Z")

</div>

How could I do pagination? The book doesn’t cover about that but I kinda feel pagination is important

---

## [Chapter 7 - routes.swift - Type Acronym has no member parameter](https://forums.kodeco.com/t/chapter-7-routes-swift-type-acronym-has-no-member-parameter/57776)

<div class="topic-metadata">

**Author:** [@arnold\_74](https://forums.kodeco.com/u/arnold_74)\
**Replies:** 2\
**Last updated:** [December 16, 2018, 8:08pm UTC](https://forums.kodeco.com/t/chapter-7-routes-swift-type-acronym-has-no-member-parameter/57776 "2018-12-16T20:08:50Z")

</div>

I was testing the examples of the book. Unfortunately this route gives me the above mentioned error: router.get("api","acronyms",Acronym.parameter){ req -\> Future\<Acronym\> in return try req.parameters.next(Acronym.s…

---

## [Vapor with Mojave beta](https://forums.kodeco.com/t/vapor-with-mojave-beta/43792)

<div class="topic-metadata">

**Author:** [@rcutshaw](https://forums.kodeco.com/u/rcutshaw)\
**Replies:** 3\
**Last updated:** [December 10, 2018, 8:16am UTC](https://forums.kodeco.com/t/vapor-with-mojave-beta/43792 "2018-12-10T08:16:35Z")

</div>

Is it possible to install Homebrew on Mojave 10.14 beta? If yes, has anyone installed Vapor and run HelloWorld successfully?

---

## [Chapter 7: create Search term query](https://forums.kodeco.com/t/chapter-7-create-search-term-query/41596)

<div class="topic-metadata">

**Author:** [@yoyohu](https://forums.kodeco.com/u/yoyohu)\
**Replies:** 8\
**Last updated:** [December 4, 2018, 9:31am UTC](https://forums.kodeco.com/t/chapter-7-create-search-term-query/41596 "2018-12-04T09:31:42Z")

</div>

How can I create a ‘contains’ query? And add this to the group query? so you can search for ‘my’ or ‘god’ instead of Oh+My+God

---

## [Chapter 7 PUT error](https://forums.kodeco.com/t/chapter-7-put-error/56631)

<div class="topic-metadata">

**Author:** [@gjzwart](https://forums.kodeco.com/u/gjzwart)\
**Replies:** 1\
**Last updated:** [November 29, 2018, 10:53pm UTC](https://forums.kodeco.com/t/chapter-7-put-error/56631 "2018-11-29T22:53:01Z")

</div>

The book specifies on page 104 (PDF-version) that one must make a request with method PUT and ‘long: What The Fudge’ as the JSON body. That will return a 400 Bad Request, requiring a value for key ‘short’. So the correct…

---

## [FatalError when testing more than the cases of the book](https://forums.kodeco.com/t/fatalerror-when-testing-more-than-the-cases-of-the-book/55453)

<div class="topic-metadata">

**Author:** [@bennokress](https://forums.kodeco.com/u/bennokress)\
**Replies:** 8\
**Last updated:** [November 28, 2018, 2:14pm UTC](https://forums.kodeco.com/t/fatalerror-when-testing-more-than-the-cases-of-the-book/55453 "2018-11-28T14:14:51Z")

</div>

Steps to reproduce: Clone my project from GitHub and run all tests or alternatively duplicate the AcronymTests.swift file (in the folder “final” of chapter 11 or later) twice and rename the classes to AdditionalTests and…

---

## [Chapter 4: Async is explained much to complicated](https://forums.kodeco.com/t/chapter-4-async-is-explained-much-to-complicated/45599)

<div class="topic-metadata">

**Author:** [@boersma](https://forums.kodeco.com/u/boersma)\
**Replies:** 6\
**Last updated:** [November 26, 2018, 7:09pm UTC](https://forums.kodeco.com/t/chapter-4-async-is-explained-much-to-complicated/45599 "2018-11-26T19:09:22Z")

</div>

The Async chapter, the fundament of Vapor, is missing a good explanation of the underlying architecture and the working of asynchronous calls in Vapor. It needs an explanation of workers and the functions being used, lik…

---

## [Build analytics with Vapor](https://forums.kodeco.com/t/build-analytics-with-vapor/56327)

<div class="topic-metadata">

**Author:** [@macbieoo](https://forums.kodeco.com/u/macbieoo)\
**Replies:** 1\
**Last updated:** [November 26, 2018, 5:05pm UTC](https://forums.kodeco.com/t/build-analytics-with-vapor/56327 "2018-11-26T17:05:48Z")

</div>

Hello guys! I heard a person saying that it is possible to build an analytics (similar to Firebase) with Vapor, is it really possible? I didn’t have the opportunity to ask how to do it. If yes, is it taught in the book? …

---

## [Chapter 6 Cloud Vapor Deploy Error](https://forums.kodeco.com/t/chapter-6-cloud-vapor-deploy-error/56274)

<div class="topic-metadata">

**Author:** [@wuudles](https://forums.kodeco.com/u/wuudles)\
**Replies:** 4\
**Last updated:** [November 26, 2018, 5:02pm UTC](https://forums.kodeco.com/t/chapter-6-cloud-vapor-deploy-error/56274 "2018-11-26T17:02:09Z")

</div>

Hi, I am following the guide in chapter 6 and on the very last step when I’m testing out my endpoint https://chen-wu-look-at-me.vapor.cloud/api/acronyms I get this error: { “reason”: “Model.defaultDatabase is require…

---

## [Chapter 10 page 164](https://forums.kodeco.com/t/chapter-10-page-164/54145)

<div class="topic-metadata">

**Author:** [@tof](https://forums.kodeco.com/u/tof)\
**Replies:** 4\
**Last updated:** [November 21, 2018, 12:07pm UTC](https://forums.kodeco.com/t/chapter-10-page-164/54145 "2018-11-21T12:07:03Z")

</div>

Hi, On page 164 if I execute DELETE http://localhost:8080/api/acronyms/1/ it suppose to generate an error But in my case I can delete the acronym without any errors My code on Acronym.swift (like is define Chapter 10 …

---

## [Question about case insensitivity](https://forums.kodeco.com/t/question-about-case-insensitivity/55268)

<div class="topic-metadata">

**Author:** [@shades](https://forums.kodeco.com/u/shades)\
**Replies:** 3\
**Last updated:** [November 20, 2018, 2:47pm UTC](https://forums.kodeco.com/t/question-about-case-insensitivity/55268 "2018-11-20T14:47:06Z")

</div>

I was trying out the search in chapter 7 (CRUD Database Operations) return Acronym.query(on: req).group(.or) { or in // 2 or.filter(\\.short == searchTerm) // 3 or.filter(\\.long == searchTerm) // 4 }.all() From wh…

---

## [Model JSON response](https://forums.kodeco.com/t/model-json-response/55281)

<div class="topic-metadata">

**Author:** [@frasco](https://forums.kodeco.com/u/frasco)\
**Replies:** 2\
**Last updated:** [November 20, 2018, 1:33pm UTC](https://forums.kodeco.com/t/model-json-response/55281 "2018-11-20T13:33:55Z")

</div>

Hi, Similar to Modeling complex JSON topic, I have the next Model on my project: final class Colegio: Codable { var id: UUID? var nombre: String var codigoMaestro: String? var rutaLogo: String? var logo: String } In m…

---

## [flatMap(to: View.self) multiple times in Leaf examples](https://forums.kodeco.com/t/flatmap-to-view-self-multiple-times-in-leaf-examples/54115)

<div class="topic-metadata">

**Author:** [@crystaltwix](https://forums.kodeco.com/u/crystaltwix)\
**Replies:** 2\
**Last updated:** [November 20, 2018, 1:15pm UTC](https://forums.kodeco.com/t/flatmap-to-view-self-multiple-times-in-leaf-examples/54115 "2018-11-20T13:15:07Z")

</div>

func userHandler(\_ req: Request) throws -\> Future\<View\> { // 2 return try req.parameters.next(User.self) .flatMap(to: View.self) { user in // 3 return try user.acronyms .query(on: req) .all(…

---

## [How to make JSON nest Class or Structure](https://forums.kodeco.com/t/how-to-make-json-nest-class-or-structure/51375)

<div class="topic-metadata">

**Author:** [@miyabi](https://forums.kodeco.com/u/miyabi)\
**Replies:** 2\
**Last updated:** [November 20, 2018, 1:11pm UTC](https://forums.kodeco.com/t/how-to-make-json-nest-class-or-structure/51375 "2018-11-20T13:11:20Z")

</div>

Hello. I will post to the forum for the first time. I’m trying to make my own Vapor APP after finishing the book and video tutorial now. I encountered some things I could not do in it. It is trying to create a class or…

---

## [TimestampKey Problem](https://forums.kodeco.com/t/timestampkey-problem/51102)

<div class="topic-metadata">

**Author:** [@pyae](https://forums.kodeco.com/u/pyae)\
**Replies:** 3\
**Last updated:** [November 20, 2018, 12:55pm UTC](https://forums.kodeco.com/t/timestampkey-problem/51102 "2018-11-20T12:55:04Z")

</div>

Have any issue with TimestampKey? I got wrong timestamp

---

## [Problems deploying to vapor cloud](https://forums.kodeco.com/t/problems-deploying-to-vapor-cloud/50630)

<div class="topic-metadata">

**Author:** [@ryancallery](https://forums.kodeco.com/u/ryancallery)\
**Replies:** 6\
**Last updated:** [November 20, 2018, 12:52pm UTC](https://forums.kodeco.com/t/problems-deploying-to-vapor-cloud/50630 "2018-11-20T12:52:54Z")

</div>

I’m having a problem deploying the TILApp project from the book to the Vapor cloud. I’ve tried to do the deploy as outlined in the book multiple times. It has deployed before but I have just completed the tasks chapter…

---

## [Chapter 8 - page 119 typo](https://forums.kodeco.com/t/chapter-8-page-119-typo/55203)

<div class="topic-metadata">

**Author:** [@shades](https://forums.kodeco.com/u/shades)\
**Replies:** 4\
**Last updated:** [November 20, 2018, 12:41pm UTC](https://forums.kodeco.com/t/chapter-8-page-119-typo/55203 "2018-11-20T12:41:01Z")

</div>

After adding a getAllHandler in the AcronymsController it says that you should remove 5 lines in routes.swift: router.get("api", "acronyms") { req -\> Future\<Acronym\> in return try req.content.decode(Acronym.self) …

---

## [Modeling more complex JSON](https://forums.kodeco.com/t/modeling-more-complex-json/51737)

<div class="topic-metadata">

**Author:** [@rcutshaw](https://forums.kodeco.com/u/rcutshaw)\
**Replies:** 2\
**Last updated:** [November 6, 2018, 8:07pm UTC](https://forums.kodeco.com/t/modeling-more-complex-json/51737 "2018-11-06T20:07:01Z")

</div>

I’ve tried to code my Vapor app to return JSON of the following structure: { “getCollectionsResult”: \[ { “\_\_type”: “CollectionSet:#MobileServices”, “operationSuccess”: true, “SetName”: “Spring 2 2018” }, { “\_\_typ…

---

## [Running multiple Tests fails (running one by one succeeds)](https://forums.kodeco.com/t/running-multiple-tests-fails-running-one-by-one-succeeds/54287)

<div class="topic-metadata">

**Author:** [@bennokress](https://forums.kodeco.com/u/bennokress)\
**Replies:** 3\
**Last updated:** [November 2, 2018, 9:16am UTC](https://forums.kodeco.com/t/running-multiple-tests-fails-running-one-by-one-succeeds/54287 "2018-11-02T09:16:22Z")

</div>

I’m following Chapter 11 - Testing on a company project, so it’s not the TIL App, but the structure for this particular part is basically the same. When testing my Users API, I always get a success on the first call and …

---

## [Can you access the Vapor Server from another device when running locally?](https://forums.kodeco.com/t/can-you-access-the-vapor-server-from-another-device-when-running-locally/52811)

<div class="topic-metadata">

**Author:** [@hodgins](https://forums.kodeco.com/u/hodgins)\
**Replies:** 2\
**Last updated:** [October 30, 2018, 9:38pm UTC](https://forums.kodeco.com/t/can-you-access-the-vapor-server-from-another-device-when-running-locally/52811 "2018-10-30T21:38:29Z")

</div>

I can’t seem to access the server from another device when running locally. It works on localhost but if I try to access from a different device it won’t work. Don’t think it’s my router as it works fine if I run simpl…

---

## [Vapor Cloud 2 Alpha launched](https://forums.kodeco.com/t/vapor-cloud-2-alpha-launched/52920)

<div class="topic-metadata">

**Author:** [@jonasschwartz](https://forums.kodeco.com/u/jonasschwartz)\
**Replies:** 1\
**Last updated:** [October 30, 2018, 9:23pm UTC](https://forums.kodeco.com/t/vapor-cloud-2-alpha-launched/52920 "2018-10-30T21:23:19Z")

</div>

For people interested in trying out the latest and greatest, we just launched Vapor Cloud 2 Alpha. Vapor Cloud 2 is a huge improvement, allowing for a lot of customization. So far it’s possible to setup and deploy your …

---

## [\[Solved\] "vapor xcode -y" opens two projects](https://forums.kodeco.com/t/solved-vapor-xcode-y-opens-two-projects/53513)

<div class="topic-metadata">

**Author:** [@bennokress](https://forums.kodeco.com/u/bennokress)\
**Replies:** 2\
**Last updated:** [October 23, 2018, 12:06pm UTC](https://forums.kodeco.com/t/solved-vapor-xcode-y-opens-two-projects/53513 "2018-10-23T12:06:21Z")

</div>

I’m following the book and every time I run vapor xcode -y it opens two Xcode projects. One of them has all the files and works perfectly, the other one seems to be an old version and has a lot of errors. So I can always…

---

## [Making a Vapor App with different profiles](https://forums.kodeco.com/t/making-a-vapor-app-with-different-profiles/51312)

<div class="topic-metadata">

**Author:** [@frasco](https://forums.kodeco.com/u/frasco)\
**Replies:** 2\
**Last updated:** [October 1, 2018, 2:20pm UTC](https://forums.kodeco.com/t/making-a-vapor-app-with-different-profiles/51312 "2018-10-01T14:20:17Z")

</div>

Hello, I’m doing a Steam application to manage school sports. Each user of this application has an assigned role and based on his profile he will see one section or another. Whats the better option to do this? I’m thin…

---

## [Table of content missing on PDF version](https://forums.kodeco.com/t/table-of-content-missing-on-pdf-version/51070)

<div class="topic-metadata">

**Author:** [@sabi](https://forums.kodeco.com/u/sabi)\
**Replies:** 1\
**Last updated:** [September 30, 2018, 4:51pm UTC](https://forums.kodeco.com/t/table-of-content-missing-on-pdf-version/51070 "2018-09-30T16:51:32Z")

</div>

I use a lot the table of content in PDFs, both in Preview and in my favorite iOS PDF reader. Usually it’s available in all RW books, but is missing in Server Side Swift with Vapor. It’d be great if added in future versio…

[Previous page](https://forums.kodeco.com/c/books/server-side-swift-vapor/36.md?page=8)

[Next page](https://forums.kodeco.com/c/books/server-side-swift-vapor/36.md?page=10)
