Giter Club home page Giter Club logo

medusajs-for-railway-boilerplate's Introduction

Medusa logo Railway logo

Medusajs open source ecommerce platform
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 a medusajs backend and storefront app created with npx create-medusa-app@latest February 2024. Modified to be plug n' play deployable on railway.app!

medusajs-backend

railway setup

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

local setup

  • Install dependencies 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)

optional

  • cloudinary: I highly recommend using a proper media service.
    1. Sign up a free account with cloudinary choose "developer API calls" type of user.
    2. Add your cloud_name, api_key & api_secret to .env.local this will eneable Cloudinary as a file service on local dev environment
    3. Configure the same environment variables in your railway dashboard to enable cloudinary in production.
    4. If the steps above was confusin, visit https://medusajs.com/plugins/medusa-file-cloudinary/ for more setup details.

commands

cd medusajs-backend/ yarn build will compile app. yarn dev will start local admin dashboard app to manage products and orders etc. yarn start will start the backend server, needed for the storefront

medusa-storefront

local setup

intall dependencies 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 medusajs-storefront/ yarn wait will keep calling backend endpoint until a backend responds. yarn build will build the nextjs app - remember to start backend app prior to running this command. yarn start will serve the frontend web shop.

medusajs-for-railway-boilerplate's People

Contributors

railway-bot avatar

Watchers

Bo Powers avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.