medusa-config.js 1.1 KB

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