Skip to content

Marktawa/golden-embers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build and Deploy Medusa: Using Railway, Cloudflare, and NeonDB

cover

Description

Build and deploy a Medusa-powered ecommerce backend. You will deploy your store's Medusa backend server to Railway, the Store Admin frontend to Cloudflare.

Link to Article

Getting Started

Clone this repo.

git clone https://github.com/Marktawa/golden-embers.git

Install and test server locally

Open store directory in your terminal.

cd golden-embers/store

Install dependencies

npm install

Create a Postgres Database on Neon.

Copy connection string from your Neon dashboard.

Create a .env inside store folder and update it with the connection string to your Neon db.

touch .env
DATABASE_URL=<Neon-connection-string>

Seed database

npx medusa seed --seed-file="./data/seed.json"

Start Medusa server.

npx medusa develop

The Medusa server will start running on port 9000. The Medusa Admin User Interface will run on port 7001.

Test your server by running the following command in a new terminal session:

curl localhost:9000/store/products

If the server is working correctly, you should see a list of products.

Visit localhost:7001 in your browser to see the Medusa Admin Dashboard. Use the Email [email protected] and Password supersecret to log in.

Medusa Admin Dashboard Login

In the Products section of your dashboard you should see a list of products. This is the dummy data you seeded into your database in the previous step.

Medusa Admin Dashboard - Products Section

Author

Mark Munyaka

GitHub: @Marktawa
Twitter: @McMunyaka

Hire Me

If you found this guide helpful and would like assistance in setting up your own Medusa-powered ecommerce store, I would be happy to help! As an experienced Medusa and Next.js developer, I can provide the following services:

  • Initial setup and configuration of your Medusa backend and Next.js storefront
  • Deployment of your Medusa store on AWS, Railway, Digital Ocean and any other platform
  • Integration with Neon Postgres, Stripe, Meilisearch, SendGrid, and other plugins
  • Customization and branding of your store's design and functionality
  • Ongoing maintenance, updates, and feature enhancements
  • Performance optimization and scaling guidance

To discuss your project and get a quote, please feel free to contact me on [email protected] or connect with me on LinkedIn or Discord. I look forward to hearing from you!

Sponsor

Support my passion for sharing development knowledge by making a donation to my Buy Me a Coffee account. Your contribution helps me create valuable content and resources. Thank you for your support!

Buy Me A Coffee Banner

Buy Me A Coffee

About

Deploy Medusa ecommerce backend on Railway and Cloudflare

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published