Skip to content

rpuls/medusajs-2.0-for-railway-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 

Repository files navigation

Medusa logo Railway logo

Prebaked medusajs 2.0 monorepo (backend + postgres + redis + +storefront)
one-click deploy on railway!

Combine Medusa's modules for your commerce backend with the newest Next.js 14 features for a performant storefront.

PRs welcome! Discord Chat Follow @medusajs

About this boilerplate

This boilerplate is a monorepo consisting of snapshot of newly released medusajs 2.0 (preview) backend and storefront app created with npx create-medusa-app@preview July 2024. Modified to be plug n' play deployable on railway.app!

Updated: to version 2.0.5

/backend

railway setup

Please change the value of environtment variables: COOCKIE_SECRET and JWT_SECRET.

local setup

Video instructions: https://youtu.be/PPxenu7IjGM

  • Install dependencies npm i or yarn
  • Rename .env.template -> .env
  • To connect to your online database, from local; copy the DATABASE_URL value that have been auto generated on railway, and add to your .env

requirements

  • postgres database (will be automatically generated if using railway template)
  • redis (will be automatically generated if using railway template)

commands

cd backend/ npm run build or yarn build will compile app. npm run start or yarn start will start the backend server, needed for the storefront npm run dev or yarn dev will start backend (and admin dasboard frontend) - in development mode

/storefront

local setup

Video instructions: https://youtu.be/PPxenu7IjGM

intall dependencies npm i or yarn Rename .env.local.template -> .env.local

requirements

  • running backend npm run start - needed to fetch products data and more, to build nextjs pages.

commands

cd storefront/ npm run build or yarn build will build the nextjs app - remember to start backend app prior to running this command. npm run start or yarn start will serve the frontend web shop. npm run dev or yarn dev will run on uncompiled code, and hot-reload as files saved with changes

Useful resources

About

Monorepo including medusajs 2.0 backend and storefront

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published