GithubHelp home page GithubHelp logo

Possible Register Bug about meanauthapp HOT 4 OPEN

bradtraversy avatar bradtraversy commented on August 21, 2024
Possible Register Bug

from meanauthapp.

Comments (4)

ryanwells-rwc avatar ryanwells-rwc commented on August 21, 2024

This may only be breaking with Angular 5 (which I'm currently using), as I see code like this still in the project:
import 'rxjs/add/operator/map';
indicating it hasn't been migrated. Perhaps there are no plans or time to do so.

from meanauthapp.

clevadani avatar clevadani commented on August 21, 2024

I'm also facing this. Any idea how to tackle this?

from meanauthapp.

tomcatbuzz avatar tomcatbuzz commented on August 21, 2024

@ryanwells-rwc are you running this on a localhost or deployed? Update the app.js with this code
// Port Number
const port = process.env.PORT || 8080;
If you are running test from local host you need that set to 3000 and have to have 1 console @project root running npm start or nodemon in port 3000. The other console is running at Angular-src with ng serve (port 4200).
I have forked this repo and will sending changes soon. I am using Angular 5 and it works deployed.

from meanauthapp.

tomcatbuzz avatar tomcatbuzz commented on August 21, 2024

@ryanwells-rwc you are getting that error because the code has been finalized for deployment and no longer contains the http://localhost:3000 in the Auth.service.ts file in front of user/register. The port was changed in App.js to PORT || 8080 for deployment to heroku, you can comment that out and put const port = 3000;
You have to add back the code like this for local testing in auth.services.ts
return this.http.post('http://localhost:3000/users/register', user, {headers: headers})
do the same for authenticate and profile. After that change and the app.js change to port 3000 you can run ng serve in angular-src (root) for port 4200. From the project root run another console with npm start or nodemon and that will run the backend at localhost 3000. If you browse to Localhost:4200 you will have the main page. Hope this helps anyone.

from meanauthapp.

Related Issues (20)

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.