-
Clone the project via
git clone https://github.com/mludi/Pagination-Sample
-
cd project-folder/server
-
create
mysql.json
inside Config or Config/secrets folder and enter your mysql credentials like
{
"host": "localhost",
"user": "root",
"password": "",
"database": "ml-sample"
}
- Run
vapor build && vapor run serve
to install dependencies and run the server
-
cd project-folder/Client
-
open
Client.xcodeproj
-
Run the project and you are done :]
Node: Set delay in Webservice.posts(currentPage: currentPage, withDelay: 1) { [weak self] (inPosts, inTotalPages, inTotalPosts, inError) in
to 0 to have normal networking, I just installed the possibility to see pagination with "slower" network in action.