kvnn / AIAgentsStarterKit-DemoProject-01

AIAgents StarterKit DemoProject 01
1 stars 0 forks source link

Provide a working FastAPI server in app.py #5

Closed kvnn closed 3 months ago

kvnn commented 3 months ago

Automated PR for Issue #4 Plan: [coding agent] app.py (FastAPI backend):

from fastapi import FastAPI

app = FastAPI()

@app.get("/")
def read_root():
    return {"Hello": "World"}

index.html (React Native frontend):

<!DOCTYPE html>
<html>
<head>
    <title>React Native Frontend</title>
</head>
<body>
    <h1>Hello World</h1>
</body>
</html>

src/App.js (React Native frontend):

import React from 'react';

function App() {
    return (
        <div>
            <h1>Hello World</h1>
        </div>
    );
}

export default App;

src/index.js (React Native frontend):

import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';

ReactDOM.render(<App />, document.getElementById('root'));

This code structure meets the requirements for the FastAPI backend and React Native frontend organization.