medusa-config.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // CORS when consuming Medusa from admin
  2. const ADMIN_CORS = process.env.ADMIN_CORS || "https://app.medusa-commerce.com";
  3. // CORS to avoid issues when consuming Medusa from a client
  4. const STORE_CORS = process.env.STORE_CORS || "http://localhost:8000";
  5. // Database URL (here we use a local database called medusa-development)
  6. const DATABASE_URL = "postgres://localhost/medusa-development";
  7. // Medusa uses Redis, so this needs configuration as well
  8. const REDIS_URL = "redis://localhost:6379";
  9. // Stripe keys
  10. const STRIPE_API_KEY = process.env.STRIPE_API_KEY || "";
  11. const STRIPE_WEBHOOK_SECRET = process.env.STRIPE_WEBHOOK_SECRET || "";
  12. // This is the place to include plugins. See API documentation for a thorough guide on plugins.
  13. const plugins = [
  14. `medusa-fulfillment-manual`,
  15. `medusa-payment-manual`,
  16. // Uncomment to add Stripe support.
  17. // You can create a Stripe account via: https://stripe.com
  18. // {
  19. // resolve: `medusa-payment-stripe`,
  20. // options: {
  21. // api_key: STRIPE_API_KEY,
  22. // webhook_secret: STRIPE_WEBHOOK_SECRET,
  23. // },
  24. // },
  25. ];
  26. module.exports = {
  27. projectConfig: {
  28. redis_url: REDIS_URL,
  29. database_url: DATABASE_URL,
  30. database_type: "postgres",
  31. store_cors: STORE_CORS,
  32. admin_cors: ADMIN_CORS,
  33. },
  34. plugins,
  35. };