philknowles / rails-vue-api

Rails 7 application using Vue as the front end and Vite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README

Steps to Create

  • rails new <app_pathname> --api

  • Gemfile: Uncomment rack-cors gem

  • Run bundle install.

  • Go to cors.rb in the config and uncomment out the middleware code.

  • rails g scaffold post title body:text

  • rails db:migrate

  • npm create vite@latest

Project Name: Vue (or whatever)
Select Framework: Vue
Select variant: JavaScript

Rails Backend

  • rails s

Rails Frontend

  • npm run dev

About

Rails 7 application using Vue as the front end and Vite


Languages

Language:Ruby 78.4%Language:Vue 13.8%Language:CSS 4.8%Language:HTML 2.0%Language:JavaScript 0.9%