# Server Side Swift with Vapor

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

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

**Page:** 11

---

## [Chapter5- PosgreSQL geometric primitives and nested dictionaries](https://forums.kodeco.com/t/chapter5-posgresql-geometric-primitives-and-nested-dictionaries/47071)

<div class="topic-metadata">

**Author:** [@earmand](https://forums.kodeco.com/u/earmand)\
**Replies:** 3\
**Last updated:** [September 29, 2018, 12:38pm UTC](https://forums.kodeco.com/t/chapter5-posgresql-geometric-primitives-and-nested-dictionaries/47071 "2018-09-29T12:38:00Z")

</div>

In the PostgresSQL database description, there is reference to using Postgres native support for geometric primitives and the ability to save nested types as dictionaries. I have searched via Google and directly on the…

---

## [Parent Children Relationship](https://forums.kodeco.com/t/parent-children-relationship/50190)

<div class="topic-metadata">

**Author:** [@pyae](https://forums.kodeco.com/u/pyae)\
**Replies:** 3\
**Last updated:** [September 28, 2018, 4:54pm UTC](https://forums.kodeco.com/t/parent-children-relationship/50190 "2018-09-28T16:54:55Z")

</div>

Can Fluent query nested model like category/id/item/id/ingredient with parent children relationship? hope to see more content with Fluent in the book

---

## [Chapter 18: Change body of getAllHandler to return \[User.Public\]](https://forums.kodeco.com/t/chapter-18-change-body-of-getallhandler-to-return-user-public/49691)

<div class="topic-metadata">

**Author:** [@axlroach](https://forums.kodeco.com/u/axlroach)\
**Replies:** 5\
**Last updated:** [September 28, 2018, 4:37pm UTC](https://forums.kodeco.com/t/chapter-18-change-body-of-getallhandler-to-return-user-public/49691 "2018-09-28T16:37:23Z")

</div>

When I attempt to make the change to: return User.query(on: req).decode(data: User.Public.self).all() I get an error that reads: Argument labels ‘(data:)’ do not match any available overloads Has something changed si…

---

## [How to use futures with many operations/computations](https://forums.kodeco.com/t/how-to-use-futures-with-many-operations-computations/49078)

<div class="topic-metadata">

**Author:** [@sturm](https://forums.kodeco.com/u/sturm)\
**Replies:** 2\
**Last updated:** [September 28, 2018, 4:36pm UTC](https://forums.kodeco.com/t/how-to-use-futures-with-many-operations-computations/49078 "2018-09-28T16:36:17Z")

</div>

I’m stuck. I think I am missing something fundamental in my understanding of route calls and futures. What I am trying to achieve is something somewhat complicated, but It would be an easy task if not using futures. I wo…

---

## [How WebsiteController differs from AcronymsController](https://forums.kodeco.com/t/how-websitecontroller-differs-from-acronymscontroller/47684)

<div class="topic-metadata">

**Author:** [@crystaltwix](https://forums.kodeco.com/u/crystaltwix)\
**Replies:** 2\
**Last updated:** [September 28, 2018, 4:14pm UTC](https://forums.kodeco.com/t/how-websitecontroller-differs-from-acronymscontroller/47684 "2018-09-28T16:14:54Z")

</div>

I noticed that in AcronymsController we have a route like /api/acronyms, but then in WebsiteController, the paradigm is different. There’s no api in any of the URLs. Is that because we start with the /index page and ever…

---

## [Chapter 6: 503 Error on vapor.cloud](https://forums.kodeco.com/t/chapter-6-503-error-on-vapor-cloud/47676)

<div class="topic-metadata">

**Author:** [@chipcastille](https://forums.kodeco.com/u/chipcastille)\
**Replies:** 3\
**Last updated:** [September 28, 2018, 4:10pm UTC](https://forums.kodeco.com/t/chapter-6-503-error-on-vapor-cloud/47676 "2018-09-28T16:10:28Z")

</div>

I can successfully deploy the project to xxx.vapor.cloud and I can successfully use rested to call localhost:8080/api/acronyms, but when trying to do so on the xxx.vapor.cloud/api/acronyms I get the following back as a r…

---

## [Vapor cloud starts sending billing emails when deploying TILApp with a Postgresql database](https://forums.kodeco.com/t/vapor-cloud-starts-sending-billing-emails-when-deploying-tilapp-with-a-postgresql-database/43503)

<div class="topic-metadata">

**Author:** [@mixio](https://forums.kodeco.com/u/mixio)\
**Replies:** 6\
**Last updated:** [September 28, 2018, 4:08pm UTC](https://forums.kodeco.com/t/vapor-cloud-starts-sending-billing-emails-when-deploying-tilapp-with-a-postgresql-database/43503 "2018-09-28T16:08:15Z")

</div>

When I deployed the example TILApp to Vapor Cloud with a Postgresql database, I started receiving billing emails. The book states p.82: “Note: The PostgreSQL database costs $7/month to use. However, you can try it out …

---

## [Swift 4.2 update](https://forums.kodeco.com/t/swift-4-2-update/49773)

<div class="topic-metadata">

**Author:** [@swiftlearnerforlife](https://forums.kodeco.com/u/swiftlearnerforlife)\
**Replies:** 3\
**Last updated:** [September 28, 2018, 4:03pm UTC](https://forums.kodeco.com/t/swift-4-2-update/49773 "2018-09-28T16:03:13Z")

</div>

Hiya Does anyone know when this book / vapor 3 will be updated for swift 4.2? Thanks

---

## [Code suggested to be removed on Chapter 8: Controller](https://forums.kodeco.com/t/code-suggested-to-be-removed-on-chapter-8-controller/45775)

<div class="topic-metadata">

**Author:** [@fjrivash](https://forums.kodeco.com/u/fjrivash)\
**Replies:** 7\
**Last updated:** [September 28, 2018, 4:00pm UTC](https://forums.kodeco.com/t/code-suggested-to-be-removed-on-chapter-8-controller/45775 "2018-09-28T16:00:23Z")

</div>

Hello, I have just downloaded the version 1.0.1 of the book and realized that in Chapter 8: Controllers, page 119, there is piece of code that is supposed to be removed from the routes.swift file however seems that is n…

---

## [Is anyone having the issue with Error 504?](https://forums.kodeco.com/t/is-anyone-having-the-issue-with-error-504/46562)

<div class="topic-metadata">

**Author:** [@thammaporn](https://forums.kodeco.com/u/thammaporn)\
**Replies:** 10\
**Last updated:** [September 27, 2018, 7:44am UTC](https://forums.kodeco.com/t/is-anyone-having-the-issue-with-error-504/46562 "2018-09-27T07:44:23Z")

</div>

Is anyone having the issue with 504 Gateway time-out or Is it just my network on the server? This doesn’t happened in localhost on my pc. I have get this error when requested the page through Token Authentication(after…

---

## [Testing on Linux failed because of try! (force try)](https://forums.kodeco.com/t/testing-on-linux-failed-because-of-try-force-try/43919)

<div class="topic-metadata">

**Author:** [@apoorvmote](https://forums.kodeco.com/u/apoorvmote)\
**Replies:** 4\
**Last updated:** [September 27, 2018, 4:32am UTC](https://forums.kodeco.com/t/testing-on-linux-failed-because-of-try-force-try/43919 "2018-09-27T04:32:07Z")

</div>

I am following book but when I tried to test on linux on Mac using docker I get following error wip-app\_1 | Fatal error: ‘try!’ expression unexpectedly raised an error: NIO.ChannelError.connectFailed(NIO.NIOConnection…

---

## [Web Services vs Server Side Methods](https://forums.kodeco.com/t/web-services-vs-server-side-methods/50522)

<div class="topic-metadata">

**Author:** [@riyawilliams](https://forums.kodeco.com/u/riyawilliams)\
**Replies:** 1\
**Last updated:** [September 24, 2018, 10:01am UTC](https://forums.kodeco.com/t/web-services-vs-server-side-methods/50522 "2018-09-24T10:01:06Z")

</div>

Hai All, With all the front-end development frameworks now available. I’d like to know if the generally accepted protocol is for a back-end service to simply provide web services for the front end to consume? For examp…

---

## [Cannot test on docker container on MacOS](https://forums.kodeco.com/t/cannot-test-on-docker-container-on-macos/49203)

<div class="topic-metadata">

**Author:** [@omaarr90](https://forums.kodeco.com/u/omaarr90)\
**Replies:** 3\
**Last updated:** [September 13, 2018, 6:23pm UTC](https://forums.kodeco.com/t/cannot-test-on-docker-container-on-macos/49203 "2018-09-13T18:23:14Z")

</div>

I followed chapter 11. but when I try to run docker-compose up --abort-on-container-exit I’m pretty sure the password is correct? I get the following: til-app\_1 | Test Case 'AcronymTests.testAcronymsCanBeRetrievedFr…

---

## [Mistake in Page 119 \[PDF Version\]](https://forums.kodeco.com/t/mistake-in-page-119-pdf-version/49081)

<div class="topic-metadata">

**Author:** [@omaarr90](https://forums.kodeco.com/u/omaarr90)\
**Replies:** 1\
**Last updated:** [September 12, 2018, 11:19am UTC](https://forums.kodeco.com/t/mistake-in-page-119-pdf-version/49081 "2018-09-12T11:19:51Z")

</div>

in page 119, the books ask to delete the get handler for getting all acronyms in routes.swift however, the signature matches but the body is for creating a new acronym.

---

## [Chapter 5 – Dependency not found](https://forums.kodeco.com/t/chapter-5-dependency-not-found/48158)

<div class="topic-metadata">

**Author:** [@p3scobar](https://forums.kodeco.com/u/p3scobar)\
**Replies:** 5\
**Last updated:** [September 9, 2018, 5:25pm UTC](https://forums.kodeco.com/t/chapter-5-dependency-not-found/48158 "2018-09-09T17:25:30Z")

</div>

When trying to deploy my application I get the following error: /vapor/til-backend-production/code/.build/checkouts/vapor.git-5492988889259800272: error: noManifest(baseURL: "https://github.com/vapor/vapor.git", version…

---

## [What about a chapter on data migrations?](https://forums.kodeco.com/t/what-about-a-chapter-on-data-migrations/45911)

<div class="topic-metadata">

**Author:** [@fluchtpunkt](https://forums.kodeco.com/u/fluchtpunkt)\
**Replies:** 2\
**Last updated:** [September 2, 2018, 1:20pm UTC](https://forums.kodeco.com/t/what-about-a-chapter-on-data-migrations/45911 "2018-09-02T13:20:49Z")

</div>

I’m in chapter 23 where you migrate the category names to being unique. It happens that I had two categories im my db that don’t have unique names. For obvious reasons you can’t migrate the database to unique names in th…

---

## [How do I return this JSON?](https://forums.kodeco.com/t/how-do-i-return-this-json/47100)

<div class="topic-metadata">

**Author:** [@rcutshaw](https://forums.kodeco.com/u/rcutshaw)\
**Replies:** 1\
**Last updated:** [September 1, 2018, 4:38am UTC](https://forums.kodeco.com/t/how-do-i-return-this-json/47100 "2018-09-01T04:38:06Z")

</div>

Here is the json I want to return from the vapor server: { “getCollectionsResult”: \[ { “\_\_type”: “CollectionSet:#MobileServices”, “operationSuccess”: true, “SetName”: “Spring 2 2018” }, { “\_\_type”: “CollectionSet…

---

## [Errata chapter 6](https://forums.kodeco.com/t/errata-chapter-6/47376)

<div class="topic-metadata">

**Author:** [@hammerhead](https://forums.kodeco.com/u/hammerhead)\
**Replies:** 1\
**Last updated:** [August 29, 2018, 3:04pm UTC](https://forums.kodeco.com/t/errata-chapter-6/47376 "2018-08-29T15:04:44Z")

</div>

Pg 109 the constructor for MySQLDatabaseConfig requires a port number so instead of: let databaseConfig = MySQLDatabaseConfig( hostname: “localhost”, username: “vapor”, password: “password”, database: “vapor”) it …

---

## [I got a error when I confirm a deploy](https://forums.kodeco.com/t/i-got-a-error-when-i-confirm-a-deploy/46375)

<div class="topic-metadata">

**Author:** [@woorazilboy](https://forums.kodeco.com/u/woorazilboy)\
**Replies:** 3\
**Last updated:** [August 29, 2018, 8:36am UTC](https://forums.kodeco.com/t/i-got-a-error-when-i-confirm-a-deploy/46375 "2018-08-29T08:36:54Z")

</div>

Hi. I was reading a Server Side Swift Vapor V.1.0.1, but, I had a problem. (p.77 Build, deploy and test) I got a error message when building app. Error: Portal Error: the portal timed out before it could finish its …

---

## [\[Chapter 11\] Weird "testAcronymsCategories" fail](https://forums.kodeco.com/t/chapter-11-weird-testacronymscategories-fail/44043)

<div class="topic-metadata">

**Author:** [@imanzarrabian](https://forums.kodeco.com/u/imanzarrabian)\
**Replies:** 1\
**Last updated:** [June 27, 2018, 2:36pm UTC](https://forums.kodeco.com/t/chapter-11-weird-testacronymscategories-fail/44043 "2018-06-27T14:36:27Z")

</div>

Hi guys, after updating some dependencies (FluentPostgreSQL 1.0.0-rc.4.0.2) I’m getting this weird failing message on one of my tests and it is not systematic, sometimes it passes sometimes it fails (seems to always fail…

---

## [Error when creating acronym (HTTPMessageDecoder)](https://forums.kodeco.com/t/error-when-creating-acronym-httpmessagedecoder/45938)

<div class="topic-metadata">

**Author:** [@lifesound](https://forums.kodeco.com/u/lifesound)\
**Replies:** 3\
**Last updated:** [August 18, 2018, 3:39pm UTC](https://forums.kodeco.com/t/error-when-creating-acronym-httpmessagedecoder/45938 "2018-08-18T15:39:25Z")

</div>

when i trying to create acronym Display Options "error": true, "reason": "There is no configured \`HTTPMessageDecoder\` for content type: text/plain." It give me this error Although the user id is correct build and ru…

---

## [Chapter20: the cookie consent message still show after click OK and refresh the web page](https://forums.kodeco.com/t/chapter20-the-cookie-consent-message-still-show-after-click-ok-and-refresh-the-web-page/45484)

<div class="topic-metadata">

**Author:** [@thammaporn](https://forums.kodeco.com/u/thammaporn)\
**Replies:** 10\
**Last updated:** [August 13, 2018, 7:33pm UTC](https://forums.kodeco.com/t/chapter20-the-cookie-consent-message-still-show-after-click-ok-and-refresh-the-web-page/45484 "2018-08-13T19:33:16Z")

</div>

Hello , I have a problem regarding the topic " Cookies" in Page 325 of Chapter 20, The cookies consent message still show after click OK and refresh the web page. and even check in both safari and google chrome bro…

---

## [Issue with the epub version on iBooks on iPad](https://forums.kodeco.com/t/issue-with-the-epub-version-on-ibooks-on-ipad/45578)

<div class="topic-metadata">

**Author:** [@ericlm](https://forums.kodeco.com/u/ericlm)\
**Replies:** 4\
**Last updated:** [August 13, 2018, 12:18pm UTC](https://forums.kodeco.com/t/issue-with-the-epub-version-on-ibooks-on-ipad/45578 "2018-08-13T12:18:15Z")

</div>

I downloaded the epub version of the book and put it to iBooks, and when I started to read it on iPad, I saw that some pages were duplicated (like ‘Book updates’ or ‘About the Cover’). As these pages are counted as real …

---

## [Parent child relation not found](https://forums.kodeco.com/t/parent-child-relation-not-found/45626)

<div class="topic-metadata">

**Author:** [@lifesound](https://forums.kodeco.com/u/lifesound)\
**Replies:** 2\
**Last updated:** [August 9, 2018, 1:55am UTC](https://forums.kodeco.com/t/parent-child-relation-not-found/45626 "2018-08-09T01:55:35Z")

</div>

the project is here https://github.com/lifesound/tilm I dont know why https://localhost:8080/api/user/:id/acronyms not found although I saw in postico the user and the acronym and the relation apparently

---

## [Chapter 18 making usernames unique](https://forums.kodeco.com/t/chapter-18-making-usernames-unique/45402)

<div class="topic-metadata">

**Author:** [@beefycode](https://forums.kodeco.com/u/beefycode)\
**Replies:** 6\
**Last updated:** [August 8, 2018, 12:40pm UTC](https://forums.kodeco.com/t/chapter-18-making-usernames-unique/45402 "2018-08-08T12:40:10Z")

</div>

I’ve been struggling with this for far too long. Not sure exactly what is going wrong here tbh. when re-writing the Migration extension for adding unique User property I get an error saying that SchemaCreator has no mem…

---

## [Chap. 2 "Creating your own routes" not working](https://forums.kodeco.com/t/chap-2-creating-your-own-routes-not-working/45444)

<div class="topic-metadata">

**Author:** [@rpitman](https://forums.kodeco.com/u/rpitman)\
**Replies:** 1\
**Last updated:** [August 3, 2018, 9:11am UTC](https://forums.kodeco.com/t/chap-2-creating-your-own-routes-not-working/45444 "2018-08-03T09:11:32Z")

</div>

When I type “vapor xcode -y” at the Terminal prompt I get “Error: Could not generate Xcode project: error: root manifest not found” What am I doing wrong? Thanks!

---

## [MySQL with latest Vapor](https://forums.kodeco.com/t/mysql-with-latest-vapor/44857)

<div class="topic-metadata">

**Author:** [@rcutshaw](https://forums.kodeco.com/u/rcutshaw)\
**Replies:** 1\
**Last updated:** [July 20, 2018, 10:55am UTC](https://forums.kodeco.com/t/mysql-with-latest-vapor/44857 "2018-07-20T10:55:42Z")

</div>

I created a vapor project using SQLite which worked well. After making changes per your video for the use of MySQL, I get the following error when running the project: "Thread 1: Fatal error: Error raised at top level:…

---

## [Notifictation of Book Updates](https://forums.kodeco.com/t/notifictation-of-book-updates/43239)

<div class="topic-metadata">

**Author:** [@uncleric](https://forums.kodeco.com/u/uncleric)\
**Replies:** 8\
**Last updated:** [August 1, 2018, 1:03am UTC](https://forums.kodeco.com/t/notifictation-of-book-updates/43239 "2018-08-01T01:03:47Z")

</div>

When is the next update to the eBook and how do I check if I’m registered to receive the notification?

---

## [Incorrect string value - Fluent-mysql](https://forums.kodeco.com/t/incorrect-string-value-fluent-mysql/45094)

<div class="topic-metadata">

**Author:** [@frasco](https://forums.kodeco.com/u/frasco)\
**Replies:** 1\
**Last updated:** [July 30, 2018, 8:18am UTC](https://forums.kodeco.com/t/incorrect-string-value-fluent-mysql/45094 "2018-07-30T08:18:50Z")

</div>

Hi, I have a property of a Model that stores into DB the path of an image, by example “/Users/fr112/Documents/App/Public/AA57DDF1-7387-4A01-B296-BFB0C0B26187.png”. When I try to save this data into the column “logo” of…

---

## [Found error in chapter16 regarding Deleting acronyms](https://forums.kodeco.com/t/found-error-in-chapter16-regarding-deleting-acronyms/44955)

<div class="topic-metadata">

**Author:** [@thammaporn](https://forums.kodeco.com/u/thammaporn)\
**Replies:** 4\
**Last updated:** [July 23, 2018, 12:43pm UTC](https://forums.kodeco.com/t/found-error-in-chapter16-regarding-deleting-acronyms/44955 "2018-07-23T12:43:22Z")

</div>

Hello , I found the error in chapter16 regarding deleting acronyms as below. I tried to remove mysql image and add it again , then build vapor project . Also checking the code by going through every concern files, b…

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

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