Giter VIP home page Giter VIP logo

angular2-rest-oauth-localstorage's Introduction

Sample Angular 2 application with OAuth2 authentication and REST backend

Build Status

Try it on Heroku: https://joggingtracker-ui-angular2.herokuapp.com/

Authentication

OAuth2 with access-token stored in local-storage

Building

npm install
Developer build

Compiles Typescript to build/js directory.

npm run build
Production build

Compiles TS, browserify and packages application to dist directory.

npm run build-dist

Running

To run this application you need to connect it to a backend such as spring-rest-oauth2-mongo. See below for proxy configuration. In real life you would deploy both backend and the frontend in one container, this is a modular approach for demonstration purposes.

Developer mode

Runs browsersync using index.html and build/js scripts. BS is configured to access backend REST api through proxy to avoid CSRF complications during development (see bs-config.js).

npm run start-dev
Production mode

Runs app.js node application providing:

  • public access to angular script files
  • proxied access to api
  • sends index.html for every other path
npm start

angular2-rest-oauth-localstorage's People

Contributors

selakavon 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.