GithubHelp home page GithubHelp logo

isabella232 / perfectapptemplate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from perfectlysoft/perfectapptemplate

0.0 0.0 0.0 73 KB

Provides a structure for a larger project to grow into. It contains an HTTP Server config that loads from pre-separated Filters and Routes, a JSON config loader, and directories into which you can organize your handlers, objects and utility functions.

Home Page: http://www.perfect.org

License: Apache License 2.0

Swift 99.22% HTML 0.78%

perfectapptemplate's Introduction

Perfect App Template

Get Involed with Perfect!

Star Perfect On Github Stack Overflow Follow Perfect on Twitter Join the Perfect Slack

Swift 3.0 Platforms OS X | Linux License Apache PerfectlySoft Twitter Slack Status

Perfect App Template Starter Project

This repository holds a template which can be cloned to serve as a starter for new work. It builds with Swift Package Manager and produces a stand-alone HTTP executable.

The concept behind this template is to provide a structure for a larger project to grow into. It contains an HTTP Server config that loads from pre-separated Filters and Routes, a JSON config loader, and directories into which you can organize your handlers, objects and utility functions.

Compatibility with Swift

The master branch of this project currently compiles with Xcode 8.2 or the Swift 3.0.2 toolchain on Ubuntu.

Building & Running

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

git clone https://github.com/PerfectlySoft/PerfectAppTemplate.git
cd PerfectAppTemplate
swift build
.build/debug/Perfect-App-Template

You should see the following output:

[INFO] Starting HTTP server localhost on 0.0.0.0:8181

This means the server is running and waiting for connections. Access http://localhost:8181/ to see the greeting. Hit control-c to terminate the server.

Starter Content

The template contains the following directories:

config

The config directory contains 2wo files ApplicationConfiguration.json and ApplicationConfigurationLinux.json. Add configuration options to these files and add them to be read and assigned in the config() function in config/Config.swift

webroot

This is for static files and Mustache template files.

Source

Perfect-App-Template / configuration

The files in this directory are meant to drive configuration of your application. Add configuration options, filters, and routes here.

Perfect-App-Template / handlers

The files in this directory are handler functions for JSON and Web routes.

Perfect-App-Template / objects

This directory is intended as the location for where you place your object classes and structs. Tere is also an initializeObjects.swift file for invoking setup functions in one convenient place.

Perfect-App-Template / utility

Place utility and helper functions here.

Further Information

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

perfectapptemplate's People

Contributors

iamjono avatar kjessup avatar rockfordwei avatar lvyile 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.