parent
98247dc94c
commit
dc494592f9
|
@ -1,11 +0,0 @@
|
|||
|
||||
# OpenStreetMap & Ar Redadeg
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
cd api
|
||||
python3 -m venv venv
|
||||
. venv/bin/activate
|
||||
pip install Flask
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
import subprocess
|
||||
from subprocess import Popen, PIPE
|
||||
from subprocess import check_output
|
||||
from flask import Flask
|
||||
|
||||
|
||||
def hello():
|
||||
stdout = check_output(['./hello.sh']).decode('utf-8')
|
||||
return stdout
|
||||
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
|
||||
|
||||
@app.route('/',methods=['GET',])
|
||||
def home():
|
||||
return '<pre>'+hello()+'</pre>'
|
||||
|
||||
|
||||
@app.route('/phase_1/',methods=['GET',])
|
||||
def phase1():
|
||||
stdout = '<pre>'+check_output(['../scripts/traitements_phase_1.sh']).decode('utf-8')+'</pre>'
|
||||
return stdout
|
||||
|
||||
|
||||
app.run(debug=True)
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
from flask import Flask
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.route('/')
|
||||
def hello_world():
|
||||
return 'Hello, World!'
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/bash
|
||||
echo "hi from shell script"
|
||||
echo "hello from shell script"
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/bash
|
||||
echo "hi from shell script"
|
||||
echo "hello from shell script"
|
Loading…
Reference in a new issue