Coder Social home page Coder Social logo

api_server's Introduction

api_server

Load into whatever directory.

Modify mysql.json file with the right password and server and username for the DB

Modify the line "with open('../mysql.json') as json_data:" to "with open('mysql.json') as json_data:"

Modify the last line "app.run(host='172.31.9.213', port=5000)" with the right IP address

to run ./api_server.py

docker image build & run

git clone directory

If you want to run ALPINE LINUX:

cp Dockerfile.Alpine Dockerfile

docker build -t miniapi .

docker run -e MYSQL_ID='db_app_user' -e MYSQL_PASSWORD='VMware123!' -e MYSQL_SERVER='fitcyclecustomers.cy4b7ufzt54x.us-west-2.rds.amazonaws.com' -p 5000:5000 miniapi

REPLACE your values for each of the parameters in the -e. Three are needed

MYSQL_ID -> id of the user in mysql

MYSQL_PASSWORD -> password for the user

MYSQL_SERVER -> location of the mysql server (IP or url or name)

If you want to run ubuntu LINUX: cp Dockerfile.standard Dockerfile docker build -t workingapp . docker run -p 5000:5000 workingapp

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.