Giter VIP home page Giter VIP logo

bojidaryovchev / nest-angular Goto Github PK

View Code? Open in Web Editor NEW
338.0 338.0 75.0 3.73 MB

NestJS, Angular 6, Server Side Rendering (Angular Universal), GraphQL, JWT (JSON Web Tokens) and Facebook/Twitter/Google Authentication, Mongoose, MongoDB, Webpack, TypeScript

License: MIT License

JavaScript 3.53% TypeScript 89.65% CSS 0.33% HTML 6.50%
angular angular-cli angular-universal express facebook-login google-login graphql jwt jwt-auth jwt-authentication mongodb mongoose nest nestjs passport passport-jwt passport-local twitter-login typescript webpack

nest-angular's People

Contributors

bojidaryovchev avatar heralight avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nest-angular's Issues

Production release

I'm on production release but webpack isn't working, can you tell us how can we build in production mode.. thank you in advance

How can i add some fields in register?

Actually the Register module is working with passports usernameOrEmail and Password, how can i add firstName, lastName (i edited the models, the interfaces and validations)

How do I run this on a server?

I am running npm run build with NODE_ENV=production to build out the production build. If I run the node dist/server/main.js express doesn't work. Is there any documentation around this?

p.s.
If I run node bin/server.bundle.js I get an error that throw new Error("[HMR] Hot Module Replacement is disabled.");

Auth Related Questions

I'm submitting a...


[ ] Regression 
[ ] Bug report
[ ] Feature request
[ ] Documentation issue or request
[x] Question 

First, thank for your sharing this code. There are very few good examples of auth with NestJS, and so I was grateful to find this one - which seems very nicely implemented.

In looking through the code, I had some questions to help me understand the choices.

Questions

  • Unless I have missed something, there is a lot of custom auth code in auth.service.ts. It looks like this is used instead of calling passport.authenticate('facebook-token'), which is the documented approach. Is this approach taken for a specific reason?
  • What was the reason for using 'passport-facebook-token' strategy/package over the 'passport-facebook' strategy/package published by the author of Passport.js? (same for twitter)
  • Have you considered any code to mitigate CRSF attacks, or is there something about this implementation that already mitigates this?
  • What was the reason for using Express Middleware directly instead of through the Nest Middleware?
  • What was the reason you decided to use custom JOI validation instead of the pipe based NestJs Object Schema Validation

Thanks for any answers.

angular build error

First, thanks @bojidaryovchev for this project, this is really nice.

However, I'm going through the commands in the README, and I'm getting this error building the angular client.

I'm running node v10.3.0 and npm 6.1.0

$ npm run build:universal

[email protected] build:universal /.../nest-angular
ng build --prod && ng run nest-angular:server

Date: 2018-06-05T02:11:49.883Z
Hash: db74eca7defd6abb3323
Time: 10524ms
chunk {0} runtime.6afe30102d8fe7337431.js (runtime) 1.05 kB [entry] [rendered]
chunk {1} styles.67d1d24c839399719958.css (styles) 170 kB [initial] [rendered]
chunk {2} polyfills.4052eade0562922bb912.js (polyfills) 128 bytes [initial] [rendered]
chunk {3} main.967b3b53a13984a78c42.js (main) 128 bytes [initial] [rendered]

ERROR in node_modules/@types/ws/index.d.ts(179,24): error TS2694: Namespace '"net"' has no exported member 'AddressInfo'.
src/client/app/app.graphql.module.ts(46,57): error TS2345: Argument of type 'DocumentNode' is not assignable to parameter of type 'DocumentNode'.
Types of property 'loc' are incompatible.
Type 'Location' is not assignable to type 'Location'. Two different types with this name exist, but they are unrelated.
Types of property 'startToken' are incompatible.
Type 'Token' is not assignable to type 'Token'. Two different types with this name exist, but they are unrelated.
Types of property 'prev' are incompatible.
Type 'Token' is not assignable to type 'Token'. Two different types with this name exist, but they are unrelated.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build:universal: ng build --prod && ng run nest-angular:server
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build:universal script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

How its works?

Hi, i tried to run your repo but i'm getting errors (server isn't running)., can you show me how to run please

Debugging

Any idea how to debug such an application? I am using VSCode. Can the same process debug the server and client code?

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.