Giter Site home page Giter Site logo

perfectstarter's Introduction

Perfect: Server-Side Swift

Perfect logo

Swift 2.2 Swift 3.0 Platforms OS X | Linux License Apache Docs Issues Donate Twitter Join the chat at https://gitter.im/PerfectlySoft/Perfect

The master branch of this project currently compiles with Swift 2.2 and with the 3.0-dev MAY toolchain using Swift Package Manager.

PerfectStarter

This repository contains all the modules as a series of sub-repositories. This gives you PerfectLib & PerfectServer, as well as every database connector and example.

git clone --recursive https://github.com/PerfectlySoft/PerfectStarter.git

Perfect is an application server for Linux or OS X which provides a framework for developing web and other REST services in the Swift programming language. Its primary focus is on facilitating mobile apps which require backend server software, enabling you to use one language for both front and back ends.

Perfect operates using either its own stand-alone HTTP/HTTPS server or through FastCGI. It provides a system for loading your own Swift based modules at startup and for interfacing those modules with its request/response objects or to the built-in mustache template processing system.

Perfect is built on its own high performance completely asynchronous networking engine with the goal of providing a scalable option for internet services. It supports SSL out of the box and provides a suite of tools which are commonly required by internet servers, such as WebSockets and iOS push notifications, but does not limit your options. Feel free to swap in your own favorite JSON or templating systems, etc.

Quick Start

OS X

Perfect relies on Home Brew for installing dependencies on OS X. This is currently limited to OpenSSL. To install Home Brew:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

To install OpenSSL:

brew install openssl
brew link openssl --force

Linux

Perfect relies on libcurl and OpenSSL:

sudo apt-get install libcurl-dev openssl

Build Starter Project

The following will clone and build an empty starter project and launch the server on port 8181.

git clone https://github.com/PerfectlySoft/PerfectTemplate.git
cd PerfectTemplate
swift build
.build/debug/PerfectTemplate

Access localhost:8181 to see the greeting. See the full source code for PerfectTemplate.

Repository Layout

We have finished refactoring Perfect to support Swift Package Manager. The Perfect project has been split up into the following repositories:

  • Perfect - This repository contains the core PerfectLib and will continue to be the main landing point for the project.
  • PerfectTemplate - A simple starter project which compiles with SPM into a stand-alone executable HTTP server. This repository is ideal for starting on your own Perfect based project.
  • PerfectStarter - This umbrella repository allows one to pull in all the related Perfect modules in one go, including the servers, examples, database connectors and documentation. This is a great place to start for people wishing to get up to speed with Perfect.
  • PerfectDocs - Contains all API reference related material.
  • PerfectExamples - All the Perfect example projects and documentation.
  • PerfectServer - Contains the PerfectServer variants, including the stand-alone HTTP and FastCGI servers. Those wishing to do a manual deployment should clone and build from this repository.
  • Perfect-FastCGI-Apache2.4 - Apache 2.4 FastCGI module; required for the Perfect FastCGI server variant.
  • Perfect-SQLite - SQLite3 database connector.
  • Perfect-PostgreSQL - PostgreSQL database connector.
  • Perfect-MySQL - MySQL database connector.
  • Perfect-MongoDB - MongoDB database connector.

The database connectors are all stand-alone and can be used outside of the Perfect framework and server.

Further Information

For more information on the Perfect project, please visit perfect.org.

perfectstarter's People

Contributors

kjessup avatar

Watchers

Ryan Collins avatar  avatar

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.