Setting up a MEAN4+ App (MongoDB, Express.js, Nodejs, Angular)

Setting up a MEAN4+ App (MongoDB, Express.js, Nodejs, Angular)

DesignCourse

6 лет назад

65,065 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@DesignCourse
@DesignCourse - 11.08.2017 15:03

Sorry about my voice/being monotone, I've had a sore throat for a damn week!

Ответить
@souravsinha5330
@souravsinha5330 - 04.06.2021 06:59

Thanks sir

Ответить
@raymondoyinlola7765
@raymondoyinlola7765 - 28.03.2020 16:40

Thank you.

Ответить
@SrinivasaPrasathseenu
@SrinivasaPrasathseenu - 30.01.2020 18:34

while hosting the project the address "localhost:3000/api/users" to "localhost:3000" help me with that

Ответить
@JP-io2go
@JP-io2go - 05.07.2019 21:41

After installing angular "Please tell me who you are".....HELP??

Ответить
@neonemesis8055
@neonemesis8055 - 25.05.2019 16:53

Idk why but bunch of things are missing already and those are already written in your code

Ответить
@programminginsight8935
@programminginsight8935 - 19.05.2019 16:20

error thrown when start node server and after i browser
: Error: ENOENT: no such file or directory, stat '/Users/dushantkwr/mean/public/main.html'

Ответить
@akhilkandibanda
@akhilkandibanda - 09.05.2019 08:12

great

Ответить
@waleedumer2122
@waleedumer2122 - 18.01.2019 10:47

Very nice and simple tutorial.
I am having an issue, i receive 404 error after publishing on the server. How to fix that?

Ответить
@DoblyTufnell
@DoblyTufnell - 09.10.2018 05:31

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.

Ответить
@codingwithglove
@codingwithglove - 04.08.2018 23:15

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?

Ответить
@kammampatisrikanth7800
@kammampatisrikanth7800 - 30.07.2018 16:41

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)

Ответить
@LexAsLex
@LexAsLex - 26.06.2018 08:43

Straight to the point! Awesome!

Ответить
@abhijitgawankar1
@abhijitgawankar1 - 20.06.2018 22:08

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)

Ответить
@MuhammadRafi007
@MuhammadRafi007 - 02.06.2018 23:17

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.

Ответить
@thedevcouch9789
@thedevcouch9789 - 22.05.2018 21:49

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

Ответить
@thedevcouch9789
@thedevcouch9789 - 22.05.2018 21:44

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`

Ответить
@giridharbharadwaj9767
@giridharbharadwaj9767 - 17.05.2018 18:40

I'm getting error "Uncaught SyntaxError: Unexpected token <" in index.html file help pls

Ответить
@Kay-hx8xb
@Kay-hx8xb - 14.04.2018 20:00

I've got the error "db.collection is not a function". What happen to this? I follow along your video

Ответить
@ujjwalkhairnar6931
@ujjwalkhairnar6931 - 06.04.2018 12:28

Can you please add tutorial for Mean 4 with typescript on server

Ответить
@pedrofigueiredo9146
@pedrofigueiredo9146 - 05.04.2018 01:26

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)

Ответить
@ujjwalkhairnar6931
@ujjwalkhairnar6931 - 04.04.2018 11:03

Thank you very much for this tutorial. It is pretty much helpful.

Ответить
@kirtanamrita2302
@kirtanamrita2302 - 24.03.2018 05:35

Finally someone using the latest version of Angular and some sanity

Ответить
@omarhabash8355
@omarhabash8355 - 22.03.2018 22:14

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?

Ответить
@nictanghe98
@nictanghe98 - 20.03.2018 23:21

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)

Ответить
@AcornFox
@AcornFox - 06.03.2018 06:52

Subbed. This is great, man.

Ответить
@adrianmadalindinu
@adrianmadalindinu - 02.03.2018 16:24

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

Ответить
@chrisheney
@chrisheney - 02.03.2018 04:21

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.

Ответить
@spiderman7801
@spiderman7801 - 01.03.2018 04:32

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!

Ответить
@user-ns1zp8wz2g
@user-ns1zp8wz2g - 13.02.2018 06:30

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?

Ответить
@pdzxc
@pdzxc - 09.02.2018 09:24

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);
});
};

Ответить
@thatcovergirl
@thatcovergirl - 08.02.2018 11:37

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

Ответить
@murthy900
@murthy900 - 27.01.2018 13:58

Short and nice! I want to donate thousand dollars, but currently, cant afford. In the future, I will. Thanks for your tutorial! :)

Ответить
@SereneAttraction
@SereneAttraction - 18.01.2018 14:55

How can we “watch” our front end and back end for changes automatically using package.json scripts?

Ответить
@kiranmungekar8918
@kiranmungekar8918 - 09.01.2018 19:48

i am getting error as TypeError: res.sendFile is not function
plzz help ...

Ответить
@winniewang2592
@winniewang2592 - 08.01.2018 17:05

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.

Ответить
@riginoommen
@riginoommen - 02.12.2017 14:42

How co consolidate the operations in ng build and npm start in single go

Ответить
@indowestlife
@indowestlife - 23.11.2017 23:14

Would have loved it if you'd have taken some time to explain the latter half of the video. Loved it anyway!

Ответить
@milankumardas1
@milankumardas1 - 23.11.2017 20:25

very nicely demonstrated !! thanks a lot for such a nice tutorial.

Ответить
@MrCam143
@MrCam143 - 10.11.2017 16:30

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.

Ответить