Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Protocol Buffers – Vapor Web Server

This is one of two backends I created for experimenting with protocol buffers. The Vapor server is a little heavier than Perfect by default, as it is configured by default to be a fully-fledged web server for HTML/CSS/JS. In practice, though, this only amounts to an extra 0.5MB of memory usage and a bit longer compile time. Documentation for Vapor is more robust than Perfect, and it is easy to get a new project started using the Vapor Toolbox command line tools. You would just need to add the Protocol Buffers dependency to the Package.swift file.

See also: Protocol Buffers – Perfect 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.

About

A very simple server, written in Swift, based on the Vapor platform.

Resources

License

Releases

No releases published

Packages

No packages published

Languages