This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// swift-tools-version:4.0 | |
import PackageDescription | |
let package = Package( | |
name: "UserAPI", | |
dependencies: [ | |
.package(url: "https://github.com/IBM-Swift/Kitura.git", .upToNextMinor(from: "2.2.0")), | |
.package(url: "https://github.com/IBM-Swift/HeliumLogger.git", .upToNextMinor(from: "1.7.1")), | |
.package(url: "https://github.com/IBM-Swift/CloudEnvironment.git", from: "6.1.0"), | |
.package(url: "https://github.com/RuntimeTools/SwiftMetrics.git", from: "2.0.0"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// MongoDBService.swift | |
// UserAPI | |
// | |
// Created by Siavash on 9/4/18. | |
// | |
import MongoKitten | |
struct MongoDataBaseService { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func postInit() throws { | |
// Endpoints | |
initializeHealthRoutes(app: self) | |
let dbServiceCollection = dbService.getCollection() | |
// register | |
router.all("/register", middleware: BodyParser()) | |
router.post("/register") { request, response, next in | |
guard let parsedBody = request.body else { | |
next() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func createOverlay(frame: CGRect, | |
xOffset: CGFloat, | |
yOffset: CGFloat, | |
radius: CGFloat) -> UIView { | |
// Step 1 | |
// let overlayView = UIView(frame: frame) | |
// overlayView.backgroundColor = UIColor.black.withAlphaComponent(0.6) | |
let blur = UIBlurEffect(style: .regular) | |
let blurViewTop = UIVisualEffectView(effect: blur) | |
blurViewTop.frame = view.bounds//CGRect(x: 0, y: 0, width: view.bounds.width, height: (view.bounds.height / 2) - 64) |
OlderNewer