Skip to content

Create Flask app factory #92

@wklumpen

Description

@wklumpen

Description

Set up main Flask application with CORS, error handlers, and basic configuration.

Tasks

  • Create create_app() function in spur/api/server.py
  • Set up CORS for React frontend (localhost:3000)
  • Add error handlers (404, 500, 400, 501)
  • Create /health endpoint returning {"status": "ok"}
  • Add basic logging configuration
  • Add config for development/production modes

Acceptance Criteria

  • Server runs on localhost:5000 with flask run
  • /health returns 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

Files Changed

  • spur/api/server.py
  • spur/api/__init__.py

Testing

python -m spur.api.server
curl http://localhost:5000/health

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions