Skip to content

Commit

Permalink
redid the frontend stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
IshayuR committed Nov 14, 2024
1 parent 662c016 commit bdcc7c1
Show file tree
Hide file tree
Showing 34 changed files with 2,295 additions and 1,476 deletions.
11 changes: 7 additions & 4 deletions Backend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
from flask import Flask, request, jsonify
from flasgger import Swagger
from database_files import databasefunctions
from flask_cors import CORS

app = Flask(__name__)
CORS(app, resources={r"/*": {"origins": "*"}})
Swagger(app) # Initialize Swagger

# -----------------------------------------------------------------------------------------
Expand Down Expand Up @@ -411,10 +413,11 @@ def fetch_allusers():
user_occupation:
type: string
"""

allusers = databasefunctions.fetch_all_users()
return jsonify(allusers), 200

try:
allusers = databasefunctions.fetch_all_users()
return jsonify(allusers), 200
except Exception as e:
return jsonify({"error": str(e)}), 500

@app.route("/fetch_allpets", methods=["POST"])
def fetch_allpets():
Expand Down
Binary file not shown.
50 changes: 0 additions & 50 deletions Frontend/React-app/README.md

This file was deleted.

69 changes: 0 additions & 69 deletions Frontend/React-app/src/App.css

This file was deleted.

23 changes: 0 additions & 23 deletions Frontend/React-app/src/App.tsx

This file was deleted.

39 changes: 0 additions & 39 deletions Frontend/React-app/src/components/Login.tsx

This file was deleted.

52 changes: 0 additions & 52 deletions Frontend/React-app/src/components/Signup.tsx

This file was deleted.

12 changes: 0 additions & 12 deletions Frontend/React-app/src/components/UserPage.tsx

This file was deleted.

15 changes: 0 additions & 15 deletions Frontend/React-app/src/main.tsx

This file was deleted.

1 change: 0 additions & 1 deletion Frontend/React-app/src/vite-env.d.ts

This file was deleted.

26 changes: 0 additions & 26 deletions Frontend/React-app/tsconfig.app.json

This file was deleted.

7 changes: 0 additions & 7 deletions Frontend/React-app/tsconfig.json

This file was deleted.

24 changes: 0 additions & 24 deletions Frontend/React-app/tsconfig.node.json

This file was deleted.

5 changes: 5 additions & 0 deletions Frontend/react-app-team51/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
npm-debug.log
dist
.git
*.md
File renamed without changes.
21 changes: 21 additions & 0 deletions Frontend/react-app-team51/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Use a Node.js base image
FROM node:18-alpine

# Set the working directory in the container
WORKDIR /app

# Copy package.json and install dependencies
COPY package.json .
RUN npm install

# Copy the rest of the application code
COPY . .

# Build the app
RUN npm run build

# Expose port 5173
EXPOSE 5173

# Serve the app
CMD ["npm", "run", "dev"]
8 changes: 8 additions & 0 deletions Frontend/react-app-team51/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# React + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
Loading

0 comments on commit bdcc7c1

Please sign in to comment.