-
Notifications
You must be signed in to change notification settings - Fork 5
Create Flask app factory #92
Copy link
Copy link
Open
Milestone
Description
Description
Set up main Flask application with CORS, error handlers, and basic configuration.
Tasks
- Create
create_app()function inspur/api/server.py - Set up CORS for React frontend (localhost:3000)
- Add error handlers (404, 500, 400, 501)
- Create
/healthendpoint returning{"status": "ok"} - Add basic logging configuration
- Add config for development/production modes
Acceptance Criteria
- Server runs on localhost:5000 with
flask run /healthreturns 200 OK with JSON response- CORS configured for localhost:3000
- Error handlers return proper JSON responses
- Logging outputs to console
Time Estimate
2 hours
Dependencies
- Depends on Create API module structure #90
Files Changed
spur/api/server.pyspur/api/__init__.py
Testing
python -m spur.api.server
curl http://localhost:5000/healthReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels