Giter Club home page Giter Club logo

weirdstack-vaporvue's Introduction

weirdstack-vaporvue

A simple app to learn some things I don't know: server-side Swift (Vapor), Vue.js with Parcel, and other things I haven't heard of yet.

The app itself - merely an excuse to try to the tech - is essentially an impoverished search engine. You can type a word into the query box, and will get a message that this word is or is not in The Words Set. If it is not in the set, the backend will add it to the set.

As the name suggests, this is not intended to be the next great stack. I am a teacher at CODE University of Applied Sciences in Berlin, where students spend their semesters working on projects. The choices sorrounding technology are entirely theirs. At the end of the semester, I am supposed to assess their work. As far as I can tell, the choice of technology is often based on what's trending on Twitter. In order to stay young and not look like a complete fool when running an exam, I try out funny stacks every now and then. The choice of technology is purely based on me not having used these tools before, not based on what makes sense.

The run.sh script might start the frontend and backend, or it might kill other things running on your computer. It is there so that I don't forget how to run this, not really for use.

Backend: Server-Side Swift (Vapor)

Technologically, the "database" is a single JSON file, words.json. This short list of words is in the repoistory, and new words are added to it on the fly. There is no long-term persitence here, it is not a DB (think impoverished NoSQL here). There is a single AP

I route, /word, which will respond with a message that either the word has been found, or it has been added to The Set. The data has been populated with the help of the appropriately named list of random words site.

I created this project using vapor new WordsSet --template=api. I am learning off of the official documentation. Swift version is 5.01, xcode is 10.2.1, Vapor 3.1.10 (I think).

To run, merely hit play in xcode. Or more universally, $ vapor build && vapor run serve

Frontend: Vue.js

The frontend is a Vue.js packaged with Parcel. It is a single view with two components: a query box for user input, and a message box below it, to show server responses.

To run: $ npm run dev.

ToDo:

  • Return meaningful data, render.
  • Add words list to backend
  • Change design to be silly
  • Add components, play with store.
  • Add a test or two
  • Dockerize backend
  • Integrate on Nuxt for server-side rendering

weirdstack-vaporvue's People

Contributors

dradamroe 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.