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
2
votes
1 answer

How to set StaticFileServer() using Kitura?

I want to see files in my localhost directory using Kitura. I've written: router.all("/test/*", middleware: StaticFileServer()) but it didn't seem to work I want to all files in my directory. Similar to directoryIndex
denis631
  • 1,765
  • 3
  • 17
  • 38
2
votes
2 answers

how to run swift server single process

I'm trying to run a swift based web server using Kitura on Ubuntu. This is following command to start hello word server. .build/debug/helloworld I can launch standalone process using .build/debug/helloworld & but launching with that creates multiple…
Bhupendra Singh
  • 121
  • 1
  • 6
2
votes
1 answer

Post gives Request Body as nil in Kitura

I tried posting a request to my localhost with a json body from REST CLIENT & POSTMAN and also from terminal. But always the request.body is nil. Using package : .Package(url: "https://github.com/IBM-Swift/Kitura", majorVersion: 1, minor: 1).
Amith Shaju
  • 143
  • 7
2
votes
1 answer

Kitura slow or low request per second?

I've download Kitura 0.20 and created a new project for a benchmark on a swift build -c release import Kitura let router = Router() router.get("/") { request, response, next in response.send("Hello, World!") …
James Lei
  • 41
  • 5
1
vote
1 answer

Xcode giving "Cannot find type 'TYPE' in scope" errors with Swift Package

I have been doing server-side development for some years now using server-side Swift, using Xcode as a convenient editing tool. And now that Xcode has support for Swift packages, the situation has generally improved. I'm not targeting any…
Chris Prince
  • 7,288
  • 2
  • 48
  • 66
1
vote
1 answer

Kitura gives me ambiguous type of expression in nested structs

I'm starting to use the Kitura framework to migrate my current node.js backend to swift and I'm starting by implementing all the routes with mocked data. Anyways, right now im at a very early stage and started to develop some mocked endpoints and…
FlashHardcore
  • 11
  • 1
  • 2
1
vote
1 answer

Run Kitura Docker Image causes libmysqlclient.so.18 Error

after i had some previous problem to Dockerise my MySQL Kitura SETUP here : Docker Build Kitura Sqift Container - Shim.h mysql.h file not found I am running in a new Problem i can not solve following the Guide from :…
Bliv_Dev
  • 557
  • 7
  • 19
1
vote
1 answer

Docker Build Kitura Sqift Container - Shim.h mysql.h file not found

i am trying to move my current Kitura Dev setup into a real running environment by first moving it into a Docker Container to later migrate it to a Cloud Provider. However while trying to build my Docker Setup for Kitura i run into problems i did…
Bliv_Dev
  • 557
  • 7
  • 19
1
vote
1 answer

Multiple parameters in codable routes in kitura

I'm trying to figure out how codable routes with parameters in Kitura work. The default example is always something simple like: GET /todos GET /todos/ What I'm looking for is: GET /todos//details Is this possible with codable routes?…
Jan
  • 1,827
  • 2
  • 16
  • 29
1
vote
1 answer

/src: error: could not find source files for target(s): MyKituraAppTests; use the 'path' property in the Swift 4 manifest to set a custom target path

I'm trying to compile using swift build Package.swift // swift-tools-version:4.2 // The swift-tools-version declares the minimum version of Swift required to build this package. // swift-tools-version:x.x import PackageDescription let package =…
1
vote
1 answer

How to decode a jwt from azure active directory in kitura?

I received an access token from azure ad and try to decode it on a kitura server. On jwt.io i can decode it successfully but not via the jwt decode routines from kitura sample project. I am using the exact code given by the sample kitura project on…
1
vote
1 answer

How to count fileds in a database query?

I got two tables, join them and now i just want to count one of them Select(count(myOtherTable.name), from: myTable).join(myOtherTable).on(myTable.name == myOtherTable.someName) Executing that query I get The operation couldn't be completed.…
1
vote
1 answer

How to use SwiftMySQLKuery with tools-utils.sh on the official swift-ubuntu image?

I'm trying to run a release build of my kitura (2.7) app with mysql on the official swift-ubuntu (latest, 5.0.1) image with the following commands. docker build --no-cache -t my-app-build -f Dockerfile-tools . docker run -v $PWD:/swift-project -w…
1
vote
1 answer

How to change process title in Swift on Linux?

Python: setproctitle How to do the same thing in Swift?
Aiden Leong
  • 121
  • 1
  • 5
1
vote
0 answers

Server-side Swift URLSession.shared.dataTask and JSONSerialization.jsonObject struggling. How to create a valid Dictionary?

Perhaps it is staring me right in the face, but I keep running into problems when I try to fill a Swift Dictionary to get rendered for a Kitura/Stencil webpage. In short, I'm calling a local server with an HTTP request (REST API) that sends back a…
thewall
  • 53
  • 6