Skip to content

zishe/angular-rails-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

Rails API + Angular Template

Creates a rails-api backend with an angular frontend. The frontend code will be located in <your-rails-app>/frontend/.

Usage

rails-api new <your-app-name> \
  --skip-sprockets \
  --skip-test-unit \
  --template=https://github.com/joshnuss/angular-rails-api/raw/master/template.rb

Features

Requirements

Common Tasks

  • To build the frontend: cd frontend && grunt build
  • To run the frontend server: cd frontend && grunt serve
  • To run the rails server: rails server
  • To run the rails specs: rake spec
  • To run the angular specs: cd frontend && grunt test

Development Mode

In dev mode, you need to run both the frontend node server grunt serve and the rails server rails server All requests are served from the frontend server, requests to /api are proxied to rails.

Deployment

Run grunt build which copies all files to /public. Only rails is needed in production.

Links

  1. Working with Angular.js and Rails
  2. grunt-slim

Time for a coffee break?

@joshnuss is a freelance software consultant. joshnuss@gmail.com

About

A template for creating angular+rails apps

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published