Комментарии:
Sorry about my voice/being monotone, I've had a sore throat for a damn week!
ОтветитьThanks sir
ОтветитьThank you.
Ответитьwhile hosting the project the address "localhost:3000/api/users" to "localhost:3000" help me with that
ОтветитьAfter installing angular "Please tell me who you are".....HELP??
ОтветитьIdk why but bunch of things are missing already and those are already written in your code
Ответитьerror thrown when start node server and after i browser
: Error: ENOENT: no such file or directory, stat '/Users/dushantkwr/mean/public/main.html'
great
ОтветитьVery nice and simple tutorial.
I am having an issue, i receive 404 error after publishing on the server. How to fix that?
Running "node server" does nothing.. Doesn't say it's running. It says nothing and just goes to the next command prompt.
Running 'node -v' says I have version 8.11.1 installed.
Do you have to build the angular app every time you want to test out stuff? Is it ok to, for example, run the express server through a separate terminal window and then use ng serve to to test the Angular app that way?
ОтветитьHow to solve this type Error
module.js:549
throw err;
^
Error: Cannot find module '../server/routes/api'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (C:\Users\Pratik Ventures\chatapplication\server.js:7:11)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
Straight to the point! Awesome!
Ответитьgetting error while running node server.. anyone can help
assert.js:42
throw new errors.AssertionError({
^
AssertionError [ERR_ASSERTION]: missing path
at Module.require (module.js:594:3)
at require (internal/module.js:11:18)
at Object.<anonymous> (D:\appData\mean\server\routes\api.js:3:21)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3) at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
I want to build production with angular and node.js. Anyone suggest me how to do this because i am building app with election and i wan to communicate api same time.
ОтветитьAngular by default wanted to build the distributable under dist/mean/ rather than directly under dist/. Had to modify angular.json to change the output directory
ОтветитьMay also be necessary to install the rxjs-compat library as it is a dependency for rxjs/add/operator/map. `npm install rxjs-compat --save`
ОтветитьI'm getting error "Uncaught SyntaxError: Unexpected token <" in index.html file help pls
ОтветитьI've got the error "db.collection is not a function". What happen to this? I follow along your video
ОтветитьCan you please add tutorial for Mean 4 with typescript on server
Ответитьin api.js seems to me that creating an object with let response = {} and using that object for all responses is bad practice. just imagine you get an error and you change the instance status to 501... all other responses will have that status (501) because in the normal response you don't set the status nor the message just the data. what am I not seeing correctly? for me, the correct way would be to create a class for this. (i'm new to express so i don't know the life cycle of the api.js but I imagine its long)
ОтветитьThank you very much for this tutorial. It is pretty much helpful.
ОтветитьFinally someone using the latest version of Angular and some sanity
ОтветитьThe entry to my Agular app is written like this "dist/index.html" in server.js (just like ur tutorial) but angular dist did not provide an html file... there is one in source; when i tried it — i was given the html but none of the angular was working.... anybody?
ОтветитьI get the following error when attemting to browse to my db api.
λ node server
Running on localhost:3000
C:\Users\nicta\Code\WebCv\node_modules\mongodb\lib\mongo_client.js:804
throw err;
^
TypeError: db.collection is not a function
at connection (C:\Users\nicta\Code\WebCv\server\routes\api.js:32:12)
at MongoClient.connect (C:\Users\nicta\Code\WebCv\server\routes\api.js:11:9)
at result (C:\Users\nicta\Code\WebCv\node_modules\mongodb\lib\utils.js:413:17)
at executeCallback (C:\Users\nicta\Code\WebCv\node_modules\mongodb\lib\utils.js:405:9)
at C:\Users\nicta\Code\WebCv\node_modules\mongodb\lib\mongo_client.js:271:5
at connectCallback (C:\Users\nicta\Code\WebCv\node_modules\mongodb\lib\mongo_client.js:940:5)
at C:\Users\nicta\Code\WebCv\node_modules\mongodb\lib\mongo_client.js:801:11
at process._tickCallback (internal/process/next_tick.js:112:11)
Subbed. This is great, man.
ОтветитьHy , i tried the code above all well and nice but there is a little problem when you are starting to use the angular router. If the Client is refreshing the page (F5) all the api send with .json({message: 'stuff'}) will be displayed; Example the angular route that will get you there is [routerLink]="['/users']" and on the backend you have a rotuer.get('/users', (req,res) => res.send({user : user})) everything will be fine untill the client refreshes the page. Do you have an ideea hou to get around that? It is so tricky did not see anyone doing this yet
ОтветитьGreat tutorial. Going to buy a membership on coursetro as I've found several of your videos helpful. Thank you!
Some feedback from a do-it-as-you-watch person: Many are use to ng serve via angular-cli ... it would have been very cool for you to have gone over configuring proxy.conf.js as part of WebPack, and even contrasting it to Browsersync initiated by gulp. Just my 2 cents.
I went through this video and followed along with writing the code and i got the following error, please give some advice:
C:\mean4>node server
module.js:540
throw err;
^
Error: Cannot find module 'C:\mean4\server'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Function.Module.runMain (module.js:684:10)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3
I have the MongoDB correctly installed as following the video, but when i did the npm install mongodb --save it was a bit different than the video as follows:
C:\mean4>npm install mongodb --save
npm WARN rollback Rolling back [email protected] failed (this is probably harmless): EPERM: operation not permitted, scandir 'C:\mean4\node_modules\fsevents\node_modules'
npm WARN rollback Rolling back [email protected] failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\mean4\node_modules\fsevents\node_modules'
npm WARN rollback Rolling back [email protected] failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\mean4\node_modules\fsevents\node_modules'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ [email protected]
added 5 packages in 13.659s
Please help thank you!
Every time I watch these videos I get told to type npm in command and this and that will be installed. It never happens, I always get errors, why is this?
ОтветитьIf you´re using mongodb 3.x.x, try this solution:
const dbName = 'mean';
// Connect
const connection = (closure) => {
return MongoClient.connect('mongodb://localhost:27017', (err, client) => {
if (err) return console.log(err);
const db = client.db(dbName);
closure(db);
});
};
hey i followed the same steps and exact code but when i hit localhost:3000/api/users i do not get the users list whats could be the reason
ОтветитьShort and nice! I want to donate thousand dollars, but currently, cant afford. In the future, I will. Thanks for your tutorial! :)
ОтветитьHow can we “watch” our front end and back end for changes automatically using package.json scripts?
Ответитьi am getting error as TypeError: res.sendFile is not function
plzz help ...
hey, great tutorial ! which helped me a lot ! just want to thank you very much! Look forward to seeing more your tutorials. Great work! I went through the code, it works with me most.
ОтветитьHow co consolidate the operations in ng build and npm start in single go
ОтветитьWould have loved it if you'd have taken some time to explain the latter half of the video. Loved it anyway!
Ответитьvery nicely demonstrated !! thanks a lot for such a nice tutorial.
ОтветитьBy far the most useful and to the point simple MEAN app with the R part of CRUD. Would love to see a part two in the future that delves more into the CUD parts. As well as adding some more angular components. such as different views.
Ответить