Questions tagged [kitura]

This tag should be used to discuss issues related to the Swift server framework Kitura.

Kitura is a server framework developed by IBM and written in the Swift programming language. This tag should be used when discussing issues and errors regarding the operation of Kitura. The tag should not be used for erroneous code that is running on Kitura if the framework has no relation to the error at hand.

89 questions
1
vote
1 answer

Kitura TypeSafeHTTPBasic auth looking for credentials in post body?

I have a TypeSafe Codeable route in Kitura defined like this: app.router.post("/games") { (auth: BasicAuth, respondWith: @escaping (Game?, RequestError?) -> ()) in ... } But when I make a get request, I receive Could not decode received JSON:…
Jack Maloney
  • 527
  • 2
  • 5
  • 18
1
vote
2 answers

SwiftKueryPostgresql connection fails with error "Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)"

I'm pretty new to Swift, more specifically on Kitura. I'm using SwiftKueryPostgresql to handle communication with database. I'm writting an ORM library for a specific project. I'm testing my connection like this (as I understood from documentation)…
Zyigh
  • 425
  • 4
  • 16
1
vote
1 answer

error: cannot convert value of type 'ObjCBool' to expected argument type 'Bool' on Swift 4.1.2 and Kitura on Ubuntu 16.04

I have a plain vanilla Ubuntu 16.04 and installed OpenSSH, Curl and Swift 4.1.2 on it. The base example (swift package init --type executable) works but when I want to use Kitura framework I got a compile error if I 'swift build' it. The…
thewall
  • 13
  • 4
1
vote
1 answer

Is there a feature like DirectoryIndex on Apache for Kitura?

In apache I have the possibility to display the directory index instead of the index.html file. Like this: Is there a similar feature in Kitura, that allows me to simply display the contents of the directory instead of having an index.html?
gebirgsbärbel
  • 2,327
  • 1
  • 22
  • 38
1
vote
2 answers

Point domain to a Web Application running on OS X Server (ex. Kitura, perfect, vapour server)

Using the OS X server application, I can point multiple domains to various websites. All domains can use port 80 at the same time and OS X will resolve which website to use. When I start my kitura server (I suppose the same happens with Vapor and…
zirinisp
  • 9,971
  • 5
  • 32
  • 38
1
vote
1 answer

Swift Package Manager Not able to resolve Kitura version above 1.4

I am trying with a sample Swift on server (using Kitura) app and using swift package manager to resolve the dependencies. Here is my sample Package.swift file. import PackageDescription let package = Package( name: "Kitura_Swift_Server", …
Abhinav
  • 37,684
  • 43
  • 191
  • 309
1
vote
1 answer

What is === and !== in Swift ? Is it similar like in JS?

I am trying to convert a js code into swift (new in both). Where I found that in js they have used === for comparing json values with string. Can someone help to me to find the meaning of === in swift (3.0) also does it do the same operation like…
Deb S
  • 509
  • 5
  • 16
1
vote
1 answer

Connecting to Oracle Database Using Server Side Swift

Is it possible yet to connect to an Oracle Database using Swift (raw or a Swift framework) on Linux? What I have done is tried to build a Docker VM, install the Oracle binaries, add the OCILIB package and then connect [tried] using a package called…
kschlagel
  • 11
  • 4
1
vote
1 answer

Kitura with CouchDB - Problems Importing CouchDB Module

I am trying to use CouchDB in my Kitura server side Swift app. I have my Package.swift with all the dependencies as shown below: let package = Package( name: "hello-kitura", dependencies:[ …
john doe
  • 9,220
  • 23
  • 91
  • 167
1
vote
1 answer

IBM Bluemix - Kitura Swift - is missing a required environment variable: 'OPENAPI_SPEC'

I am stuck for the moment. I cannot obtain the source code for the mobile project and I do not know where is the problem. All my researches was without positive result. My intention with IBM Bluemix is to develop myself a small project only in Swift…
TyTan
  • 13
  • 2
1
vote
1 answer

Simplify Kitura RouterHandler by removing 'next' closure?

I'm playing with Kitura. I have installed a single router endpoint that looks like: let router = Router() router.all() { _, response, next in response.headers["Content-Type"] = "application/json; charset=utf-8" …
Craig Otis
  • 31,257
  • 32
  • 136
  • 234
1
vote
1 answer

Using Microsoft SQL Server in Kitura

I need to check if I could use SQL Server with Kitura hosted in Bluemix using ICT (IBM Cloud Tool). I like the idea of Swift in the Server but at the same time I only know Microsoft SQL Server Database which is hosted externally and would like to…
ioopl
  • 1,735
  • 19
  • 19
1
vote
1 answer

Server Sent Events with Kitura

I try to do a client-server application with on the client side a Angular2/typescript web site and on the server side a Kitura server in Swift on Mac OSX. On the client side, the typescript code instanciates an EventSource object : …
Notux
  • 13
  • 2
1
vote
1 answer

Find nill on rendering a response

I'm using Stencil. In the method below fails as the marked line comes back nil. This is straight from Paul Hudson's Kitura book (page 208). I have the stencil file in place and everything looks cool. I've imported KituraStencil added the template…
Hartix
  • 310
  • 3
  • 13
1
vote
1 answer

How to test for CORS in Kitura?

Task To enable CORS on a Kitura server hosted on Bluemix. Development machine OS X 10.12.1, Swift version 3.0.2. Deployed to Ubuntu 14.04, Swift 3.0.1. Code I am using Kitura-CORS middleware from IBM to enable CORS. .Package(url:…
user6736861