Help us understand the problem. What is going on with this article?

go-on-rails: A Rails generator to develop or generate a Go application

More than 1 year has passed since last update.

The project's repo: https://github.com/railstack/go-on-rails

go-on-rails is a Rails generator aims to:

  • Integrate some APIs written in Golang to existed Rails app for high performance
  • Use your farmiliar Rails tools to develope and manage a Golang app project
  • Convert a not very complicated Rails app to Golang equivalent

Here's a simple example(tutorial) shows the basic usage of go-on-rails generator, and another example shows how to integrate Go APIs in a Rails project.

Prerequisites

  • Rails 4.2+
  • Golang 1.7+

Installation

Add this line to your application's Gemfile:

gem 'go-on-rails', '~> 0.3.0'

And then execute:

$ bundle

Or install it yourself as:

$ gem install go-on-rails

Usage

You must have a Rails app or to create one before you can try go-on-rails generator to convert a Rails app to Golang codes.

After that you can just run the command to convert the application:

rails g gor [dev(elopment) | pro(duction) | test] [-m model_a model_b model_c ...]

Then a directory named "go_app" with Golang codes will be generated under your Rails app root path.

Install the dependent Golang packages:

rails gor:deps

Then change to the go_app directory and run:

go run main.go

You can visit the page in http://localhost:4000 by default.

More command details about go-on-rails generator:

rails g gor --help

More details to visit the project's repo: https://github.com/railstack/go-on-rails

Issues and PRs are very Welcome !!

B1nj0y
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした