{"id":26768088,"url":"https://github.com/raphox/next-rails-app","last_synced_at":"2025-03-28T21:19:34.843Z","repository":{"id":208621314,"uuid":"719761460","full_name":"raphox/next-rails-app","owner":"raphox","description":"A Rails app using https://github.com/raphox/next-rails","archived":false,"fork":false,"pushed_at":"2025-02-02T02:11:32.000Z","size":475,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-02T03:19:31.774Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raphox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-16T21:07:05.000Z","updated_at":"2025-02-02T02:11:35.000Z","dependencies_parsed_at":"2025-01-23T21:20:57.779Z","dependency_job_id":"99117d88-2ddc-40a0-ba01-39813afb1ee7","html_url":"https://github.com/raphox/next-rails-app","commit_stats":null,"previous_names":["raphox/next-rails-app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphox%2Fnext-rails-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphox%2Fnext-rails-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphox%2Fnext-rails-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphox%2Fnext-rails-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raphox","download_url":"https://codeload.github.com/raphox/next-rails-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246100578,"owners_count":20723479,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-28T21:19:34.284Z","updated_at":"2025-03-28T21:19:34.834Z","avatar_url":"https://github.com/raphox.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gem [next_rails_scaffold](https://github.com/raphox/next_rails_scaffold) sample app\n\n## Setup\n\nCreate the Rails app:\n\n```\nrails new my_api --api\n```\n\nInstall dependencies:\n\n```\n# Uncomment the `gem \"rack-cors\"` line in the Gemfile.\nbundle add foreman --group \"development\"\nbundle add next_rails_scaffold\n```\n\nAllow to local environment to access the Rails app from any resource.:\n\n```ruby\n# config/initializers/cors.rb\n\nRails.application.config.middleware.insert_before 0, Rack::Cors do\n  allow do\n    origins Rails.env.local? ? \"*\" : \"example.com\" # Change `example.com` as you need.\n\n    resource \"*\",\n      headers: :any,\n      methods: [:get, :post, :put, :patch, :delete, :options, :head]\n  end\nend\n```\n\nCreate your `Procfile.local`:\n\n```\n# Procfile.local\n\napi: bundle exec rails server -p $PORT -b 0.0.0.0\nnext: cd ./frontend \u0026\u0026 NEXT_PUBLIC_API_URL=http://0.0.0.0:$(( PORT - 100 ))/api yarn dev -p $PORT -H 0.0.0.0\n```\n\n## Running\n\nAfter to [setup](#setup), run to following command to start the Rails and Next.js applications:\n\n```\nforeman start -f Procfile.local --port=8000\n```\n\n\u003e **TIP:** Use `foreman start -f Procfile.github --port=8000` on Github.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraphox%2Fnext-rails-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraphox%2Fnext-rails-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraphox%2Fnext-rails-app/lists"}