This is an SPA starter using Vite Ruby(include Ruby on Rails 7) with Svelte.
Ruby 3.0.0 is used on this repo
Rails 7.0.0 is used on this repo
Svelte 4.2.0 is used on this repo
TBA
You can clone this repo by Github using command line prompt:
git clone https://github.com/southparkstan123/rails-svelte-starter.git
After cloning the repo, install the dependencies for frontend and backend by following command:
yarn install && bundle install
You can add the .env files to store the configuration value for different environments , the example file is in .env.template
, just copy this file for specific environment.
For example, in development, create .env.development.local
, then input the key and value on it.
In addition, you can add the test configurations for your local machine by copy .env.template
, then create and modify as .env.test.local
Important You have to ensure that MySQL and Redis driver is installed in your local machine.
If you not require the username and password for your database, just comment out the username and password field on config/database.yml
You can create the database and migration by following command:
rails db:create && rails db:migrate
If you want to seeding of a database with data by following command:
rails db:seed
TBC
TBC
TBC
Run rails s -b 0.0.0.0
and access http://<YOUR_HOST_NAME_IN_ENV_FILE>:3000
on Web browser.
Remark: Edit your hosts file for your host name
If you want to enable HMR, run foreman s -f Procfile.dev
Happy Coding!!!!!