Fakultas Ilmu Komputer UI

Commit ec38bbf8 authored by ADRIAN WIJAYA's avatar ADRIAN WIJAYA
Browse files

Initial commit

parents
#user http;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
# Logging pada nginx
log_format upstreamlog '$server_name to: $upstream_addr [$request] '
'upstream_response_time $upstream_response_time '
'msec $msec request_time $request_time';
# Cek file logging
upstream app {
# Konfigurasi tipe-tipe load balancer
# By default menggunakan round-robin
#ip_hash;
#least_conn;
server 127.0.0.1:5000;
server 127.0.0.1:5001;
server 127.0.0.1:5002;
}
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name localhost;
access_log /var/log/nginx/access.log upstreamlog;
# Diberi reverse_proxy dengan label app
location / {
proxy_pass http://app;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;
# location / {
# root html;
# index index.html index.htm;
# }
#}
# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;
# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# location / {
# root html;
# index index.html index.htm;
# }
#}
}
from flask import request, Flask, Response
import json
app = Flask(__name__)
@app.route('/', methods=['GET'])
def get_all_path():
data = {
"url": "localhost:5000/",
"method": "GET",
"status": 200
}
return json.dumps(data)
if __name__=='__main__':
app.run(port = 5000)
attrs==20.3.0
click==7.1.2
coverage==5.5
Flask==1.1.2
gunicorn==20.0.4
iniconfig==1.1.1
itsdangerous==1.1.0
Jinja2==2.11.3
MarkupSafe==1.1.1
packaging==20.9
pluggy==0.13.1
protobuf==3.15.5
py==1.10.0
pyparsing==2.4.7
pytest==6.2.2
pytest-cov==2.11.1
python-dotenv==0.15.0
six==1.15.0
toml==0.10.2
Werkzeug==1.0.1
Flask_Dance==3.3.1
Flask-Sentinel==0.0.7
GitHub-Flask==3.2.0
Flask-SQLAlchemy==2.4.3
SQLAlchemy==1.3.17
Werkzeug==1.0.1
from flask import request, Flask, Response
import json
app = Flask(__name__)
@app.route('/', methods=['GET'])
def get_all_path():
data = {
"url": "localhost:5001/",
"method": "GET",
"status": 200
}
return json.dumps(data)
if __name__=='__main__':
app.run(port = 5001)
attrs==20.3.0
click==7.1.2
coverage==5.5
Flask==1.1.2
gunicorn==20.0.4
iniconfig==1.1.1
itsdangerous==1.1.0
Jinja2==2.11.3
MarkupSafe==1.1.1
packaging==20.9
pluggy==0.13.1
protobuf==3.15.5
py==1.10.0
pyparsing==2.4.7
pytest==6.2.2
pytest-cov==2.11.1
python-dotenv==0.15.0
six==1.15.0
toml==0.10.2
Werkzeug==1.0.1
Flask_Dance==3.3.1
Flask-Sentinel==0.0.7
GitHub-Flask==3.2.0
Flask-SQLAlchemy==2.4.3
SQLAlchemy==1.3.17
Werkzeug==1.0.1
from flask import request, Flask, Response
import json
app = Flask(__name__)
@app.route('/', methods=['GET'])
def get_all_path():
data = {
"url": "localhost:5002/",
"method": "GET",
"status": 200
}
return json.dumps(data)
if __name__=='__main__':
app.run(port = 5002)
attrs==20.3.0
click==7.1.2
coverage==5.5
Flask==1.1.2
gunicorn==20.0.4
iniconfig==1.1.1
itsdangerous==1.1.0
Jinja2==2.11.3
MarkupSafe==1.1.1
packaging==20.9
pluggy==0.13.1
protobuf==3.15.5
py==1.10.0
pyparsing==2.4.7
pytest==6.2.2
pytest-cov==2.11.1
python-dotenv==0.15.0
six==1.15.0
toml==0.10.2
Werkzeug==1.0.1
Flask_Dance==3.3.1
Flask-Sentinel==0.0.7
GitHub-Flask==3.2.0
Flask-SQLAlchemy==2.4.3
SQLAlchemy==1.3.17
Werkzeug==1.0.1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment