GithubHelp home page GithubHelp logo

modern-web-apps-with-angular's Issues

404 GET /api/projects

When i npm run lite I see [HPM] Proxy created: /api -> http://localhost:9876 and when I go to http://localhost:9876/api/projects I can see the json.

But when i load the angular app on port 3000 I get 404 GET /api/projects... Like on the videos I am certain that my bs-config is set up properly and the http-proxy-middleware was installed correctly.

Do you know why the proxy server cannot be used to get the data from 9876?

Cant get the data from server when uploaded on the web

Hi,
I just tried to upload the server on heroku, it works fine, at the end of my server.js file I have:

app
  .use(bodyParser.json())
  .use('/api', router).listen(process.env.PORT || 3000, function(){
  console.log("Express server listening on port %d in %s mode", this.address().port, app.settings.env);
})

but I cant get the data to my frontend Angular application. It says:

[HPM] Error occurred while trying to proxy request /api/login from localhost:3000 to https://blooming-waters-35403.herokuapp.com (undefined) (https://nodejs.org/api/errors.html#errors_common_system_errors)

my bs-config.js file looks like this:

const proxyMiddleware = require('http-proxy-middleware');
const proxyURL = 'https://blooming-waters-35403.herokuapp.com';

module.exports = {
  ghostMode: false,
  server: {
    middleware: [proxyMiddleware('/api', { target: proxyURL })]
   }
};

I did not make any other changes on this project, so I think it should be working fine, but it isnt. Please, what should I do?

Material version is wrong, breaks app

This tutorial claims that the correct version of the Material library is ^2.0.0-alpha.9-3 and that the latest version available should work, but in fact you have to roll back to exactly 2.0.0-alpha.9-3 in order for the app to work.

The version used in the tutorial breaks, and I was unable to fix it until I looked at the commit history for the Material library and found the latest version with a file structure that matches what this repo and the tutorial expect:
https://github.com/angular/material2/releases/tag/2.0.0-alpha.9

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.