Git Product home page Git Product logo

ng2-mean's Introduction

ng2-mean

MEAN stack using Angular 2

Getting Started

To get started, run npm install, bower install, and then in your terminal run gulp serve. This will get the server running on port 3000 by default.

Also, I can't get gulp-typescript to compile the .ts files without putting the other gulp tasks in an infinite loop. I'm still working on that part. So for now you manually have to compile the .ts files in the terminal (tsc).

About

Passport-local is being used for authentication. I'm working on user management and authentication on the front end. Logging in works, but it's lost on a browser refresh. I need to work through persisting that.

I've also extended the built in Angular 2 Router Outlet to require authentication to go to certain routes. This works, but it won't work when returning an observable from a service that calls to the servers. It only works if you have a locally stored loggedIn variable that you manage.

TODO

As I'm new to full stack development, I'm open to suggestions for authentication strategies. I like the simplicity of passport-local, but if there's a better way to do user authentication that allows to pass around information about the user and keep track of authentication I am open. The only way I've previously kept track of a user with passport-local is by appending the user object to the body of the document when the server returns the layout view, and then in the Angular app checking for that object. However, that seems a little janky, and if there's a better way to handle user management I'd love to hear and learn. Any input is welcome.

ng2-mean's People

Contributors

pjlamb12 avatar

Stargazers

 avatar

Watchers

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