╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ > Type your message or @path/to/file │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
README.mdを見てみる。vs codeを起動。
README.mdの中身。
# Vue.js and FastAPI App
This project is a simple web application with a Vue.js frontend and a FastAPI backend.
## Project Structure
– `/backend`: FastAPI application
– `/frontend`: Vue.js application
## How to Run
### 1. Backend (FastAPI)
First, set up and run the backend server.
“`bash
# Navigate to the backend directory
cd backend
# Create a virtual environment (if you haven’t already)
python -m venv venv
# Activate the virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
# Install dependencies (if you haven’t already)
pip install -r requirements.txt
# Run the FastAPI server
uvicorn main:app –reload
“`
The backend server will be running at `http://127.0.0.1:8000`.
### 2. Frontend (Vue.js)
Next, set up and run the frontend application.
“`bash
# Navigate to the frontend directory
cd frontend
# Install dependencies (if you haven’t already)
npm install
# Run the Vue development server
npm run serve
“`
The frontend application will be running at `http://localhost:8080` (or another port if 8080 is busy).
### 3. Create a User and Login
1. Before you can log in, you need to create a user. You can do this by sending a POST request to the `/users/` endpoint of the backend API. You can use tools like `curl` or Postman.