https://github.com/vaporexampleslab/quicwebbserver
https://github.com/vaporexampleslab/quicwebbserver
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/vaporexampleslab/quicwebbserver
- Owner: VaporExamplesLab
- Created: 2019-05-13T01:37:09.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-13T07:10:32.000Z (about 7 years ago)
- Last Synced: 2024-12-31T21:26:22.511Z (over 1 year ago)
- Language: Swift
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# [QuicWebbUpdater][t]
[t]:https://github.com/VaporExamplesLab/QuicWebbUpdater
[Getting Started](#GettingStarted) •
[Original Setup](#OriginalSetup) •
[Resources](#Resources)
**Prerequisites**
* [Install Xcode 10 ⇗](https://itunes.apple.com/us/app/xcode/id497799835?mt=12)
* [Install homebrew ⇗](https://brew.sh/)
* [Install vapor toolbox ⇗](https://docs.vapor.codes/3.0/install/macos/)
**Download|Clone & Run**
Steps to download repository:
``` bash
## go to your working directory
cd
## download and unzip
wget https://github.com/VaporExamplesLab/QuicWebbUpdater/archive/master.zip
unzip master.zip -d QuicWebbUpdater
rm master.zip # remove download
cd QuicWebbUpdater-master
# update dependencies
# with `-y` yes to generate and open Xcode project
vapor update -y
```
Or, alternate steps to clone repository instead of download:
``` bash
## go to your working directory
cd
## either clone
## add --bare option for an unattached instance
git clone git@github.com:VaporExamplesLab/QuicWebbUpdater.git
cd QuicWebbUpdater
# update dependencies
# with `-y` yes to generate and open Xcode project
vapor update -y
```
**Directory Structure**
``` bash
blog_content_original/
html/
# markdown/…/*.md pages map to blog_content_processed/leaf/_m/…/*.leaf
# markdown/…/*_files/* map to blog_content_processed/public/_m/…/*.leaf
markdown/
yyyy/
MM/
article_files
article.md
paprika/
#
blog_content_processed/
leaf/
_h/
_m/
yyyy/
mm/
article.leaf
_r/
public/
_h/
_m/
yyyy/
mm/
article_files/*
_r/
QuicWebbUpdater/
Public/ # must match URL for relative addressing
_h → blog_content_processed/public/_h
_m → blog_content_processed/public/_m
_r → blog_content_processed/public/_r
Resources/
Views/ # path to leaf can be revised by router ?
_h → blog_content_processed/leaf/_h
_m → blog_content_processed/leaf/_m
_r → blog_content_processed/leaf/_r
```
_route_
``` swift
```
_leaf template_
``` leaf
```
``` bash
cd QuicWebbUpdater
ln -s ../../blog_content_processed/public/_h Public/_h
ls -l Public/_h/
ln -s ../../blog_content_processed/public/_m Public/_m
ls -l Public/_m/
ln -s ../../blog_content_processed/public/_r Public/_r
ls -l Public/_r/
ls -l Public
ln -s ../../../blog_content_processed/leaf/_h Resources/Views/_h
ls -l Resources/Views/_h/
ln -s ../../../blog_content_processed/leaf/_m Resources/Views/_m
ls -l Resources/Views/_m/
ln -s ../../../blog_content_processed/leaf/_r Resources/Views/_r
ls -l Resources/Views/_r/
ls -l Resources/Views
```
Set Xcode scheme to "Run > My Mac".

Click the run button and check the results in a browser at `http://localhost:8080`.

The following steps were completed to create the `QuicWebbUpdater` example.
**Create Vapor Website Project**
Create a `QuicWebbUpdater` project from the command line terminal:
``` bash
vapor new QuicWebbUpdater --web
cd QuicWebbUpdater
# add directory for README.md assets
mkdir README_files
touch README_files/.git_keep # create file so folder is not empty for `git`
# update dependencies
# with `-y` yes to generate and open Xcode project
vapor update -y
```
* [Bootstrap ⇗](https://getbootstrap.com)