Code Monkey home page Code Monkey logo

third-page's Introduction

YELLOWPRINT

Ruby on Rails + Angular code template for Banana Coding

How to create a new project from this template?

  1. Create a new repo on github
  2. Open Terminal
  3. Create a bare clone of the repository.
git clone --bare [email protected]:BananaCoding/yellowprint
  1. Mirror-push to the new repository.
cd yellowprint.git
git push --mirror [email protected]:BananaCoding/new-repository.git

Where new-repository is the name of your new github repo. 5. Remove template folder from your local machine.

cd ..
rm -rf yellowprint.git
  1. Clone new repo to your local machine.
git clone [email protected]:BananaCoding/new-repository.git

Prerequisite

  • install rbenv
brew install rbenv
brew upgrade rbenv ruby-build
  • ruby 2.5.0
rbenv install 2.5.0
rbenv global 2.5.0
  • nodejs brew install node
  • yarn brew install yarn

Setup project

Dev Machine
  1. Mac user have to install Xcode command line tool first
  • xcode-select --install # Install Command Line Tools if you haven't already.
  • sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
  1. install yarn https://yarnpkg.com/lang/en/docs/install
  2. install ruby 2.5.0(Windows: https://rubyinstaller.org/, Mac: https://github.com/rbenv/rbenv#homebrew-on-macos)
  3. clone code from YellowPrint repo "git clone [email protected]:BananaCoding/yellowprint.git"
  4. create config/application.yml you can copy sample config from config/application.sample.yml
  5. create config/database.yml you can copy sample config from config/database.sample.yml
  6. run "yarn install"
  7. run "gem install bundler"
  8. run "sudo bundle install"
  9. run "rake db:setup" to setup database
  10. start server with "rails s" command
  11. open "localhost:3000" on your web browser
Figaro: environment variables (ENV)

We're using Figaro as a Rails app configuration, so please create your own 'config/application.yml' by running

bundle exec figaro install

you can see the required ENV in 'config/initializer/figaro.rb'

ps. please also check 'config/application.sample.yml'

Heroku
  1. link project to Heroku repo by using command
git remote add heroku [email protected]:project.git

where project is the name of your Heroku project

  1. deploy to Heroku by using command git push heroku master
Drone (CI)

We are using Drone as CI (Continuous Integration). Please check .drone.yml file

You also have to setup your Drone project and environment variables at http://drone.bananacoding.com

Following are required variables

  1. HEROKU_API_KEY (You can get the key from Heroku website > Account Setting > API Key)
  2. HEROKU_LOGIN (Your email)
  3. HEROKU_GIT_URL (https://git.heroku.com/your-app-name.git ** where your-app-name is your Heroku app name)
  4. EMAIL_HOST
  5. EMAIL_USERNAME
  6. EMAIL_PASSWORD

Rails Admin

You can enable rails admin by adding rails_admin_path variable into your application.yml file

Translation

We are using i18n and i18n-js together, which means you can use ruby I18n translation on client side like this javascript code

I18n.t("KEY")

third-page's People

Contributors

kraiwut avatar m-phanat avatar ton-tonton avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.