Skip to content

Latest commit

 

History

History
39 lines (37 loc) · 1.23 KB

configuration.md

File metadata and controls

39 lines (37 loc) · 1.23 KB

React Proxy

  • Description: React server needs to know where is the backend server.
  • Location: react-app/package.json
    "proxy": "http://127.0.0.1:8080/"

Database Connection

  • Description: Gin server needs to use it to connect to MySQL database.
  • Location: gin-app/rest/handler.go
    func NewHandler() (HandlerInterface, error) {
        db, err := db.NewORM("mysql", "root:6ytow2-;S3lA@/gomusic")    // Pattern: <username>:<password>@/<schema> 
        // omit other lines
    }

Stripe API Key

  • Description: Stripe requires an API key for online credit card charging.
  • Location:
    • react-app/src/CreditCards.js
      export default function CreditCardInformation(props) {
        // omit other lines
        return (
          <div>
            <StripeProvider apiKey="pk_test_TYooMQauvdEDq54NiTphI7jx">
            </StripeProvider>
          </div>
        );
      }
    • gin-app/rest/handler.go
      func (h *Handler) Charge(c *gin.Context) {
          // omit other lines
          stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"
      }