Code Monkey home page Code Monkey logo

ios-short-s3-monolith's Introduction

Monolith Service

This repository contains the monolith service from Udacity's server-side Swift curriculum. The monolith is a simple Swift server that exposes three endpoints:

  • /
    • returns a basic message
  • /login
    • when provided a valid username/password, returns an auth token
  • /secure
    • when provided a valid auth token, returns a "secure" message

To experiment with the endpoints, see the Lesson 1: Monolith Docs on Apiary.

Also, the monolith uses the Swift Package Manager to manage dependencies.

Swift Dependencies

  • Kitura
  • HeliumLogger
  • Kitura-Credentials
  • Kitura-CredentialsHTTP
  • Perfect-Crypto

How to Use

The monolith service can technically be built to run on macOS or Ubuntu Linux. However, we recommend building for Ubuntu Linux since that will likely be the environment used if you were to deploy the monolith into the cloud. Furthermore, to assure consistency between development and possible deployment environments, Docker is used. Take the following steps to build and run the monolith:

1] Build the Docker Image

docker build -t s3-monolith:1.0.0 .

2] Run the Docker Image (start Bash shell)

docker run --privileged --rm -it -v $(pwd):/app -p 8080:8080 s3-monolith:1.0.0 /bin/bash

3] Build the Monolith

# assuming you are located at /app
swift build

4] Run the Monolith

# assuming you are located at /app
.build/debug/monolith

5] Test an Endpoint!

curl localhost:8080

ios-short-s3-monolith's People

Contributors

jarrodparkes avatar sudkul avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

mrxcitement

ios-short-s3-monolith's Issues

Facing issue with `swift build`

Hi, I am facing issue with running swift build Any help would be appreciated. Thanks.

In file included from /app/.build/checkouts/Perfect-LinuxBridge.git--2461238964130732388/LinuxBridge/LinuxBridge.c:2: /app/.build/checkouts/Perfect-LinuxBridge.git--2461238964130732388/LinuxBridge/include/LinuxBridge.h:6:10: fatal error: 'uuid/uuid.h' file not found #include <uuid/uuid.h> ^ 1 error generated. error: terminated(1): /usr/bin/swift-build-tool -f /app/.build/debug.yaml main

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.