Skip to content
A simple API server based on the Perfect web server that reverses strings found in received protocol buffers.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Sources/ProtobufServer
.gitignore
LICENSE
Package.pins
Package.swift
README.md

README.md

Protocol Buffers – Perfect Web Server

This is one of two backends I created for experimenting with protocol buffers. The Perfect server uses slightly less memory, as it has fewer options installed by default. Setup is pretty simple using the Perfect Assistant, you just need to add the Protocol Buffers dependency to the Package.swift file.

See also: Protocol Buffers – Vapor Web Server

See also: Client iOS App

Installation Instructions

Already have Swift? Jump to Install Server.

Install Swift

  1. Open a terminal.
  2. Install swiftenv using homebrew: brew install swiftenv.
  3. Install Swift using swiftenv: swiftenv install 3.1.1

Install Server

  1. Clone this repository.
  2. Open terminal in the directory you just created.
  3. Compile the server: swift build

Running the Server

  1. In the same directory you just built from: .build/debug/ProtobufServer
  2. You should see a message stating that the server has started at localhost:8080
  3. Press Control-C to quit the server.
You can’t perform that action at this time.