Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/PerfectExamples/Perfect-Blog-Mustache
An Example Blog & Mustache Template System for Perfect
https://github.com/PerfectExamples/Perfect-Blog-Mustache
mustache mustache-templating perfect server-side-swift swift
Last synced: 2 months ago
JSON representation
An Example Blog & Mustache Template System for Perfect
- Host: GitHub
- URL: https://github.com/PerfectExamples/Perfect-Blog-Mustache
- Owner: PerfectExamples
- Created: 2016-09-28T20:55:00.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-02-15T11:21:20.000Z (almost 2 years ago)
- Last Synced: 2024-08-02T00:22:34.619Z (6 months ago)
- Topics: mustache, mustache-templating, perfect, server-side-swift, swift
- Language: Swift
- Homepage:
- Size: 38.1 KB
- Stars: 31
- Watchers: 6
- Forks: 11
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- Awesome-Swift-Packages - Perfect-Blog-Mustache - An Example Blog & Mustache Template System for Perfect. (Samples)
README
# Perfect Blog Mustache Example[简体中文](README.zh_CN.md)
An Example Blog & Mustache Template System for Perfect
This project demonstrates the following:
* Mustache templating
* URL routing and handlers
* URL Variables
* Static file serving
* SQLite3 database setup, and search.This package builds with Swift Package Manager and is part of the [Perfect](https://github.com/PerfectlySoft/Perfect) project.
Ensure you have installed Xcode 8.0 or later.
## Setup - Xcode 8
* Check out or download the project;
* In terminal, navigate to the directory and execute```
swift package generate-xcodeproj
```* Open `Perfect-Blog-Mustache.xcodeproj`
Due to the complexity of running static file serving from Xcode, we suggest running this project from Terminal.
## Setup - Terminal
* Check out or download the project;
* In terminal, navigate to the directory
* Execute `swift build`
* Once the project has compiled, execute `./.build/debug/Perfect-Blog-Mustache````
[INFO] Starting HTTP server on 0.0.0.0:8181 with document root ./webroot
```## Routes
* [http://localhost:8181](http://localhost:8181) - Generates the list of blog posts
* http://localhost:8181/story/{storyid} - Linked to from the blog list, this displays the detail of the blog post.## Further Information
For more information on the Perfect project, please visit [perfect.org](http://perfect.org).