Giter Site home page Giter Site logo

mscs621-concordance's Introduction

Swagger generated Concordance server

Overview

This server was generated by the swagger-codegen project. By using the OpenAPI-Spec from a remote server, you can easily generate a server stub. This is an example of building a swagger-enabled Flask server.

This example uses the Connexion library on top of Flask. **May have to import this library separately with this command

pip install connexion[swagger-ui] --user

Requirements

Python 3.5.2+

Usage with Cloud9 EC2 server

To run the server, please execute the following from the root directory. Make sure to specify --user if you do not have access:

pip3 install -r requirements.txt --user
python3 -m swagger_server

and open your browser to here:

http://18.217.73.244:8080/mscs721/concordance/1.0.0/ui/

Your Swagger definition lives here:

http://18.217.73.244:8080/mscs721/concordance/1.0.0/swagger.json

Running with uWSGI locally

To run for production mode, use uWSGI:

pip3 install -r requirements.txt --user
uwsgi --http :8080 --wsgi-file swagger_server/__main__.py --callable application

OR (using uwsgi.ini config file)
pip3 install -r requirements.txt --user
uwsgi uwsgi.ini

Running with Docker

To run the server on a Docker container, please execute the following from the root directory:

# building the image
docker build -t mscs621-concordance .

# starting up a container
docker run -p 8080:8080 -e AWS_ACCESS_KEY_ID=<AWS_ACCESS_KEY_ID> -e AWS_SECRET_ACCESS_KEY=<AWS_SECRET_ACCESS_KEY> -e AWS_DEFAULT_REGION=us-east-2 mscs621-concordance

Adding Fontend with Docker Compose

Contains a docker-compose file, orechstrating a ReactJS frontend container and Python uWSGI backend container. It is served off of http://localhost. Note** missing .env files in both frontend and backup folders.

To build and run both of the Docker containers, please execute the following from the root directory:

# create the images and run both containers (--build force builds a new image)
docker-compose up --build

mscs621-concordance's People

Contributors

alexfuoc avatar

Watchers

James Cloos avatar Michael Gildein avatar  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.