tutsplus / modern-web-apps-with-angular Goto Github PK
View Code? Open in Web Editor NEWLicense: BSD 2-Clause "Simplified" License
License: BSD 2-Clause "Simplified" License
You need to change your package.json for the quick start package.json for angular-in-memory-web-api to be 0.1.13 not ~0.1.13 or else it has dependency clashes with rxjs and zone.js.
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?
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?
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.