Perfect Blog Mustache Example简体中文
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 project.
Ensure you have installed Xcode 8.0 or later.
- 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.
- 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
- 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.
For more information on the Perfect project, please visit perfect.org.