Knowledge Base
KamlatechToolBlogContact Us
  • Kamlatech Documentation
  • Magento
    • Installation
    • Email Configuration
  • Blogger
    • Adding Code Block
  • Linux
    • Managing Logs
    • Prevent Package Update
  • Node
    • Installation
    • Http-Server
  • Github
    • .gitignore
    • Branch to New Repo
  • HTML
    • Common Header & Footer in HTML
  • Linkedin Infographics
    • Flame Retardant Standards
    • Flame Retardant Terms
  • Music
    • Pandit Niladri Kumar - Sitar
  • Applications
    • Konvect Connect
    • Konvect Fetcher
    • Konvect Fetcher WebApp
  • HTTPS SSL Certificate
    • Lets's Encrypt
  • Oracle Cloud Instance
    • Firewall
    • CPU Stressing
    • CPU Stressing Docker
  • SFTP
    • WinSCP SFTP
  • NextCloud
    • Installation
    • Post Install Tweak
    • PHP Version
  • Wordpress
    • NGINX Configuration
    • Image upload / Crop issue
    • Required PHP Modules
    • PHP Configuration
  • Healthcare Wearables (Cardiac)
    • Wearable ECG
    • Arrhythmia
    • Ambulatory ECG Usecase
    • Understanding EKG Leads
  • Flutter
    • Direct URL Access
    • Change Android PackageName
  • Math
    • Online Equation Writing
  • Backend Web Service
    • Flask App Deployment
  • 3D Modeling
    • DWG in Solid Edge
  • MariaDB
    • MariaDB Commands
  • Excel
    • HTML as String in Excel
  • Tools
    • Online Tools
  • PostgreSQL
    • PostgreSQL Installation
  • MEDUSA
    • Medusa Installation
    • Backend Server/Worker Mode
    • Frontend Deployment
  • Jupyter Lab
    • Jupyter Web App
  • WooCommerce
    • Product Filename Renaming
  • Embedded
    • Flash Xiao Sense Bootloader
Powered by GitBook
On this page
Edit on GitHub
  1. MEDUSA

Frontend Deployment

PreviousBackend Server/Worker ModeNextJupyter Web App

Last updated 2 months ago

To deploy the frontend first ensure that the backend admin and worker servers are up and running. This is required as during the frontend building, static pages are generated for which data is pulled from backend.

If you have a working frontend, be sure to backup your .env.local file, as it stores you working configuration.

To update frontend, first copy the content of package.json in the root of frontend folder fromt this Optionally you can do a clean install, by deleting the content of forntend folder and then downloading the repo. Here my-medusa-storefront is the name of your frontend folder.

git clone https://github.com/medusajs/nextjs-starter-medusa my-medusa-storefront

Now install the latest node modules.

cd my-medusa-storefront
npm install
# Optional in case you do not have a backed up .env.local
mv .env.template .env.local

To run the development environment, use below command and the server will start

npm run dev

For deploying the production environment we need to first build the same using

npm run build
# ensusre that the backend is configured properly and running (admin and worker)

Then to start the frontend production server, rin

npm run start

The server should sucessfully start

repo