Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/igorbezsmertnyi/angular-2-rails-starterkit
Starter-kit for angular 4 and Ruby on Rails
https://github.com/igorbezsmertnyi/angular-2-rails-starterkit
angular angular-2 angular-rails angular2 angular2-rails angular4 angular4-rails rails
Last synced: about 1 month ago
JSON representation
Starter-kit for angular 4 and Ruby on Rails
- Host: GitHub
- URL: https://github.com/igorbezsmertnyi/angular-2-rails-starterkit
- Owner: igorbezsmertnyi
- License: mit
- Created: 2017-05-24T19:33:40.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-27T18:21:59.000Z (over 7 years ago)
- Last Synced: 2024-09-28T17:21:20.933Z (about 2 months ago)
- Topics: angular, angular-2, angular-rails, angular2, angular2-rails, angular4, angular4-rails, rails
- Language: JavaScript
- Homepage:
- Size: 86.9 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Angular 2 Rails Starterkit
quick start with angular 2 and rails api application## Installtion
```npm install angular-2-rails-starterkit -g```
for linux ```sudo npm install angular-2-rails-starterkit -g```## Quick Start
- **Install Angular-CLI**
```npm install -g @angular/cli```
for linux ```sudo npm install -g @angular/cli```
- **Generate Rails project**
```rails new PROJECT_NEME --api```
- **Install gems**
Add to **Gemfile**
> ```gem 'rack-rewrite'```
> ```gem 'rack-cors'```
> ```gem 'foreman'``` to ```group :development```
>then run ```bundle install```
- **Config ```config.ru``` in root directory
file sould looks like this example```
require_relative 'config/environment'use Rack::Rewrite do
rewrite %r{^(?!.*(api|\.)).*$}, '/index.html'
endrun Rails.application
```- **Inside project folder run starterkit**
```starterkit -g```
- **Strat Server**
```bundle exec foreman start -f Procfile.dev```
- **Generate Production**
```ng build --prod```[LINK TO NPM PACKAGE](https://www.npmjs.com/package/angular-2-rails-starterkit)