Giter Site home page Giter Site logo

restaurant-server-vapor's Introduction

Restaurant Server Vapor

Tested on client

Prepare temporary docker container

# if running Docker on ARM (Mac M1) and getting error:
# docker: no matching manifest for linux/arm64/v8 in the manifest list entries
# use th089/swift instead of swift, i.e.
# docker run -p 8090:8090 -it --name Restaurant -w/Restaurant th089/swift bash
docker run -p 8090:8090 -it --name Restaurant -w/Restaurant swift bash

git clone https://github.com/dbystruev/Restaurant-Server-Vapor.git .
apt update && apt -y upgrade
apt -y install libssl-dev zlib1g-dev
swift build -c release
exit

Create docker image

docker commit Restaurant restaurant
docker rm Restaurant

Run new detached Restaurant container from restaurant image

docker run --name Restaurant -p8090:8090 -d restaurant swift run -c release

API

  • /categories — list of caregories
  • /menu?category=salads - meals in salads category
  • /menu — all meals in all categories
  • /order — post meals' IDs to get preparation time:
    curl \
        -X POST \
        -H "Content-Type: application/json" \
        -d '{"menuIds": [2, 1, 1, 4, 5]}' \
        mda.getoutfit.co:8090/order

restaurant-server-vapor's People

Contributors

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