Skip to content

Instantly share code, notes, and snippets.

View candostdagdeviren's full-sized avatar

Candost candostdagdeviren

View GitHub Profile
@candostdagdeviren
candostdagdeviren / links.md
Created June 14, 2016 08:21 — forked from MarkVillacampa/links.md
All the Apple Developer links you need from WWDC16

Videos

@candostdagdeviren
candostdagdeviren / main.swift
Last active March 21, 2017 23:06
Swift Backend main executable file.
import Kitura
import HeliumLogger
import CouchDB
HeliumLogger.use()
let connProperties = ConnectionProperties(
host: "127.0.0.1", // httpd address
port: 5984, // httpd port
secured: false, // https or http
@candostdagdeviren
candostdagdeviren / SwiftBackend.swift
Created March 20, 2017 22:16
SwiftBackend file inside SwiftBackendLib module.
import Kitura
import HeliumLogger
import CouchDB
public class SwiftBackend {
public static func run() {
HeliumLogger.use()
let connProperties = ConnectionProperties(
host: "127.0.0.1", // httpd address
@candostdagdeviren
candostdagdeviren / main.swift
Created March 20, 2017 22:19
Main file after restructuring SwiftBackend project.
import SwiftBackendLib
SwiftBackend.run()
@candostdagdeviren
candostdagdeviren / Package.swift
Created March 20, 2017 22:24
Package file after reshaping SwiftBackend app for making it testable
import PackageDescription
let package = Package(
name: "SwiftBackend",
targets: [
Target(name: "SwiftBackendLib"),
Target(name: "SwiftBackendApp", dependencies: ["SwiftBackendLib"])
],
dependencies: [
.Package(url: "https://github.com/IBM-Swift/Kitura.git", majorVersion: 1, minor: 4),
@candostdagdeviren
candostdagdeviren / UserTests.swift
Last active March 21, 2017 22:38
Basic Test file for SwiftBackend
//
// UserTests.swift
// SwiftBackend
//
// Created by Candost Dagdeviren on 12/03/2017.
//
import XCTest
@testable import SwiftBackendLib
@candostdagdeviren
candostdagdeviren / LinuxMain.swift
Created March 21, 2017 22:35
Basic LinuxMain.swift for SwiftBackend
import XCTest
@testable import SwiftBackendLib
XCTMain([
testCase(UserTests.allTests)
])
@candostdagdeviren
candostdagdeviren / Dockerfile
Last active March 21, 2017 23:01
Basic Dockerfile for SwiftBackend
FROM ibmcom/swift-ubuntu:latest
MAINTAINER Candost Dagdeviren <[email protected]>
ADD . /app
WORKDIR /app
EXPOSE 8090
USER root
RUN swift build
CMD [".build/debug/SwiftBackendApp"]
@candostdagdeviren
candostdagdeviren / .swiftlint.yml
Last active September 15, 2024 19:51
Sample SwiftLint file to apply best practices
disabled_rules: # rule identifiers to exclude from running
- variable_name
- nesting
- function_parameter_count
opt_in_rules: # some rules are only opt-in
- control_statement
- empty_count
- trailing_newline
- colon
- comma