File size: 677 Bytes
17bfd8a
0138096
 
 
31f5053
17bfd8a
 
 
31f5053
 
15ba21a
31f5053
ad08015
 
d18f13f
 
1aef3cf
 
 
 
 
 
0138096
1aef3cf
17bfd8a
 
0138096
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# server/app.py
import os
import uvicorn
from fastapi import FastAPI
from openenv.core.env_server import create_web_interface_app

# Update these imports!
from server.env import JiraToCodeEnv
from src.jira_to_code.models import JiraCodeAction, JiraCodeObservation

env = JiraToCodeEnv

app = create_web_interface_app(env, JiraCodeAction, JiraCodeObservation)

@app.get("/")
def root():
    return {"message": "Jira-to-Code running"}

@app.get("/health")
def health():
    return {"status": "ok"}

def main():
    port = int(os.environ.get("PORT", 7860))
    # Update this path!
    uvicorn.run("server.app:app", host="0.0.0.0", port=port)

if __name__ == "__main__":
    main()