/angular2-token-example

Example for Angular2-Token, a token based authentication service for Angular2 with multiple user support

Primary LanguageJavaScriptMIT LicenseMIT

Angular2-Token

Join the chat at https://gitter.im/lynndylanhurley/devise_token_auth Angular 2 Style Guide

About

This an example for Angular2-Token a token based authentication service for Angular2 with multiple user support. It uses a Rails 5.0 API backend with the devise token auth gem.

Angular2-Token is currently in Alpha. Any contribution is much appreciated.

Live Demo

You can find a running example here.

Content

Requirements

  • NodeJs >= 6.3.1
  • Ruby >= 2.2.2

Installation

  1. Clone this repository with

    git clone https://github.com/neroniaky/angular2-token-example.git
  2. Move to the directory and install gem dependencies

    cd angular2-token-example
    bundle install
  3. Migrate the database

    rails db:migrate
  4. Move to the angular2-client directory and install Angular2 dependencies

    cd angular2-client
    npm install

Run the app

  1. Run the rails server in the main directory with

    rails server
  2. Open a second terminal and run the npm server in the angular2-client directory with

    npm start
  3. Open http://localhost:3001/ in your browser

License

The MIT License (see the LICENSE file for the full text)