Code Monkey home page Code Monkey logo

vapor-backend's Introduction

This backend built with:

API Template

Documentation Team Chat MIT License Continuous Integration Swift 5.1

Master Branch


2 Apps, 1 language, full stack!

Screenshot


Backend Running on localhost

Vapor Instance Screenshot

Backend server running on Vapor written in Swift

The server runs a script that scrapes https://snopes.com/fact-check

An object holding text variables is initialized using dynamic values and encoded into JSON. The JSON is made available on a GET endpoint ("http://localhost:8080/snopes")


Frontend Running on device

Front End Screenshot

Front End App running on iPhone 11 Simulator

The Frontend downloads JSON data and decodes into identical object (Data model was literally copy/pasted with 1 minor change - encodable conformity was changed to decodable conformity)

The results are displayed on a tableView. One of the scraped variables is the article's text in html. This is displayed on a detail view using a WkWebview.


Normally something even this simple would require the use of at least 2 programming languages (one to create a web-facing interface using a server-side language such as node.js) and one for the frontend (using Swift for both in this case).

I was able to put this together in just a couple hours, using a process I'm wholly unfamiliar with. The convenience of using one development environment and one language is priceless. Encoding/decoding is a breeze, data modeling - not even a concern.

vapor-backend's People

Contributors

froggomad avatar

Stargazers

Aaron avatar Nguyen Duc Nhat Y avatar  avatar

Watchers

 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.