Skip to content

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Latest commit

 

History

100 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Warning

This is a demo application for the Inertia Rails Starter Kit with deployment and SSR set up, along with a few UI elements to showcase available layouts.

Note: This repository is updated via force pushes.

Inertia Rails React Starter Kit

A modern full-stack starter application with Rails backend and React frontend using Inertia.js based on the Laravel Starter Kit.

Features

See also:

Built by Evil Martians

Setup

  1. Clone this repository
  2. Setup dependencies & run the server:
    bin/setup
  3. Open http://localhost:3000

Enabling SSR

This starter kit comes with optional SSR support. To enable it, follow these steps:

  1. Open app/frontend/entrypoints/inertia.ts and uncomment part of the setup function:
    // Uncomment the following to enable SSR hydration:
    // if (el.hasChildNodes()) {
    //   hydrateRoot(el, createElement(App, props))
    //   return
    // }
  2. Open config/deploy.yml and uncomment several lines:
    servers:
      # Uncomment to enable SSR:
      # vite_ssr:
      #   hosts:
      #     - 192.168.0.1
      #   cmd: bundle exec vite ssr
      #   options:
      #     network-alias: vite_ssr
       
    # ...
       
    env:
      clear:
        # Uncomment to enable SSR:
        # INERTIA_SSR_ENABLED: true
        # INERTIA_SSR_URL: "http://vite_ssr:13714"
       
    # ...
       
    builder:
      # Uncomment to enable SSR:
      # dockerfile: Dockerfile-ssr

That's it! Now you can deploy your app with SSR support.

License

The project is available as open source under the terms of the MIT License.

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages