medusa-config.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // CORS when consuming Medusa from admin
  2. const ADMIN_CORS = process.env.ADMIN_CORS || "http://localhost:7000,http://localhost:7001";
  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 =
  7. process.env.DATABASE_URL || "postgres://localhost/medusa-store";
  8. // Medusa uses Redis, so this needs configuration as well
  9. const REDIS_URL = process.env.REDIS_URL || "redis://localhost:6379";
  10. // Stripe keys
  11. const STRIPE_API_KEY = process.env.STRIPE_API_KEY || "";
  12. const STRIPE_WEBHOOK_SECRET = process.env.STRIPE_WEBHOOK_SECRET || "";
  13. // This is the place to include plugins. See API documentation for a thorough guide on plugins.
  14. const plugins = [
  15. `medusa-fulfillment-manual`,
  16. `medusa-payment-manual`,
  17. // Uncomment to add Stripe support.
  18. // You can create a Stripe account via: https://stripe.com
  19. // {
  20. // resolve: `medusa-payment-stripe`,
  21. // options: {
  22. // api_key: STRIPE_API_KEY,
  23. // webhook_secret: STRIPE_WEBHOOK_SECRET,
  24. // },
  25. // },
  26. ];
  27. module.exports = {
  28. projectConfig: {
  29. // redis_url: REDIS_URL,
  30. // For more production-like environment install PostgresQL
  31. // database_url: DATABASE_URL,
  32. // database_type: "postgres",
  33. database_database: "./medusa-db.sql",
  34. database_type: "sqlite",
  35. store_cors: STORE_CORS,
  36. admin_cors: ADMIN_CORS,
  37. },
  38. plugins,
  39. };