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

Share
Embed
  • Published on Aug 11, 2017
  • Written tutorial: goo.gl/pCKGiP
    coursetro.com for more awesomeness!
    Github repo for this project:
    github.com/designcourse/mean4plus
    - - - - - - - - - - - - - - - - - - - - - -
    Subscribe for NEW VIDEOS weekly!

    My site: coursetro.com
    My personal FB account: logodesigner
    Coursetro FB: coursetro
    Coursetro's Twitter: designcoursecom
    Join my Discord! discord.gg/a27CKAF
    ^-Chat with me and others
    - - - - - - - - - - - - - - - - - - - - - -
    Who is Gary Simon? Well, I'm a full stack developer with 2+ decades experience and I teach people how to design and code. I've created around 100+ courses for big brands like LinkedIn, Lynda.com, Pluralsight and Envato Network.
    Now, I focus all of my time and energy on this channel and my website Coursetro.com.
    Come to my discord server or add me on social media and say Hi!
  • Howto & StyleHowto & Style

Comments • 126

  • DesignCourse
    DesignCourse  2 years ago +4

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

    • Marcos Guimaraes
      Marcos Guimaraes Year ago

      It was ok

    • HAIFA Ben Slama
      HAIFA Ben Slama Year ago

      I have the same problem :( Could you help us please :)

    • shweta mahure
      shweta mahure Year ago

      DesignCourse 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

    • **
      ** Year ago

      great vid ... could you kindly explain the closure() bit? cheers.

    • Vitaliy Podolskiy
      Vitaliy Podolskiy 2 years ago

      What about, to do setting up, with nestjs.com ? it's very similar with angular. I will be interested that. Thank you!

  • John Pratt
    John Pratt 2 months ago

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

  • Michael Schlotthauer
    Michael Schlotthauer 3 months ago

    What if you want to use MongoDB with mongoose?

  • Anshu Johri
    Anshu Johri 4 months ago

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

  • Dushant Jung Kwr
    Dushant Jung Kwr 4 months ago

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

    • Anshu Johri
      Anshu Johri 4 months ago

      i saw that html file is not inside dist, actually there is another folder called mean(in my case) in which the html file contains but now i'm not getting an error but getting a blank white page xD
      edit: i solved it. Just change the directories to new ones in server.js

  • Akhil Kandibanda
    Akhil Kandibanda 4 months ago

    great

  • Waleed Umer
    Waleed Umer 8 months ago

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

  • Palash Mandal
    Palash Mandal 10 months ago

    Hi Gary,
    I have got an error like " ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'api/users''".
    Also FYI. I've using Node 8.12.0 & npm 6.4.1.
    could you please help me out with that ASAP ?

  • Brad Ford
    Brad Ford 11 months ago

    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.

  • Pixsa
    Pixsa Year ago

    how did you make C:\Users\gary\code[no arrow] command

  • Garrett Love
    Garrett Love Year ago

    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?

  • kammampati srikanth

    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. (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)

  • Andrea B.
    Andrea B. Year ago

    Straight to the point! Awesome!

  • Abhijit Prakash Gawankar

    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. (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)

  • Muhammad Rafi
    Muhammad Rafi Year ago

    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.

  • theDevCouch
    theDevCouch Year ago +1

    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

    • Game 733
      Game 733 8 months ago

      you sir saved my hours of efforts

    • Marco Aguilar
      Marco Aguilar Year ago

      I'm new to Angular and I don't know if that's good practice, but it fixed my annoying problem! Thank you!

  • theDevCouch
    theDevCouch Year ago

    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`

    • Ryan Kirkland
      Ryan Kirkland Year ago

      It's 100% necessary I think. You saved me haha. Thanks!

  • giridhar bharadwaj
    giridhar bharadwaj Year ago +2

    I'm getting error "Uncaught SyntaxError: Unexpected token

  • Khanh Lê
    Khanh Lê Year ago +3

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

    • Garrett Love
      Garrett Love Year ago

      Thanks for this. For anyone watch this video, this comment fixed this error for me on Mongo 4.0 - Angular 6

    • Khanh Lê
      Khanh Lê Year ago

      Prateek Pandey I think it did not work for newer version of Angular

    • Prateek Pandey
      Prateek Pandey Year ago +3

      const connection = function(closure) {
      return mongoClient.connect('mongodb://localhost:27017/', function(err, db) {
      if (err) return console.log(err);
      var dbo = db.db('mean');
      closure(dbo);
      });
      };
      this did the trick for me I guess it will help you too

    • Bhanu Prakash
      Bhanu Prakash Year ago

      Khanh Le: That worked for me! Thanks mate :)

    • Khanh Lê
      Khanh Lê Year ago +1

      So, first of all, you need to install mongojs module: npm install --save mongojs.
      And then, add the following code to your js file:
      const mongojs = require('mongojs');
      const db = mongojs('YOUR_CONNECTION_STRING');
      And get access to any collection in your current db by using db.COLLECTION_NAME.find(callback);
      e.g db.Student.find((err, students) => { console.log(students) });

  • Ujjwal Khairnar
    Ujjwal Khairnar Year ago

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

  • Pedro Figueiredo
    Pedro Figueiredo Year ago

    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)

  • Ujjwal Khairnar
    Ujjwal Khairnar Year ago

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

  • Cesar Santos Visbal Lambis

    why do you use 3000 and no the 4200 port ?

  • Mrugank Patankar
    Mrugank Patankar Year ago

    Finally someone using the latest version of Angular and some sanity

  • Omar Habash
    Omar Habash Year ago

    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?

  • Nic Tanghe
    Nic Tanghe Year ago

    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)

  • Mustakrakish
    Mustakrakish Year ago

    Subbed. This is great, man.

  • Adrian Dinu
    Adrian Dinu Year ago

    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 Year ago

    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.

  • Spider Man
    Spider Man Year ago

    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 node-pre-gyp@0.6.39 failed (this is probably harmless): EPERM: operation not permitted, scandir 'C:\mean4\node_modules\fsevents\node_modules'
    npm WARN rollback Rolling back tar-pack@3.4.0 failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\mean4\node_modules\fsevents\node_modules'
    npm WARN rollback Rolling back ajv@4.11.8 failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:\mean4\node_modules\fsevents\node_modules'
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
    + mongodb@3.0.3
    added 5 packages in 13.659s
    Please help thank you!

    • Scott Selke
      Scott Selke Year ago

      You are not in the right directory. You need to go into C:\mean4\src and then run node server.
      Also, be sure to change // API file for interacting with MongoDB
      const api = require('./server/routes/api');
      TO
      // API file for interacting with MongoDB
      const api = require('../server/routes/api');

  • Computer Analyst
    Computer Analyst Year ago

    Guys, Important Update : Please Note For MongoDB Users with version 3 or later :
    .
    .
    The modified "api.js" is given below + fully fixed the code & it's working after facing the problem of db.collection error :
    .
    .
    /*edit is done in //connect portion of the code & for better understanding i have provided the whole code of modified "api.js"*/
    .
    .
    const express = require('express');
    const router = express.Router();
    const MongoClient = require('mongodb').MongoClient;
    const ObjectID = require('mongodb').ObjectID;
    // Connect
    const connection = (closure) => {
    return MongoClient.connect('mongodb://localhost', (err, client) => {
    if(err) throw err;
    var db = client.db('mean');

    db.collection('users').findOne({}, function (findErr, result) {
    if (findErr) throw findErr;
    console.log(result.name);
    client.close();
    });

    //if (err) return console.log(err);
    closure(db);
    });
    };
    // Error handling
    const sendError = (err, res) => {
    response.status = 501;
    response.message = typeof err == 'object' ? err.message : err;
    res.status(501).json(response);
    };
    // Response handling
    let response = {
    status: 200,
    data: [],
    message: null
    };
    // Get users
    router.get('/users', (req, res) => {
    connection((db) => {
    db.collection('users')
    .find()
    .toArray()
    .then((users) => {
    response.data = users;
    res.json(response);
    })
    .catch((err) => {
    sendError(err, res);
    });
    });
    });
    module.exports = router;
    -----------------------------------------------------
    Thank You :)

  • Matt Bakken
    Matt Bakken Year ago

    For anyone getting errors trying to connect to their MongoDB server: check what version you're using. There is a different way to set up your api.js file when connecting to mongodb v3.0+. See this page for breaking changes: github.com/mongodb/node-mongodb-native/blob/3.0.0/CHANGES_3.0.0.md#api-changes.

  • Kostya Ostapuk
    Kostya Ostapuk Year ago

    show POST request. Please!

  • Akash Potdar
    Akash Potdar Year ago

    TRY THIS INSTEAD..!
    var dbMean;
    var collectionUser;
    // Connect
    const connection = (closure) => {
    return MongoClient.connect('mongodb://localhost:27017/', (err, client) => {
    if (err) return console.log(err);
    dbMean = client.db('mean');
    closure(dbMean);
    });
    };
    // Get users
    router.get('/users', (req, res) => {
    connection((dbMean) => {
    collectionUser = dbMean.collection('user');
    collectionUser
    .find()
    .toArray()
    .then((users) => {
    console.log(users);
    response.data = users;
    res.json(response);
    })
    .catch((err) => {
    sendError(err, res);
    });
    });
    });

  • Akash Potdar
    Akash Potdar Year ago

    Trying to hit localhost:3000/api/users, seeing the angular default page and tried with postman, i get the default angular template. Please need help.

  • s
    s Year ago

    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?

    • Hank Lancaster
      Hank Lancaster Year ago

      Make sure you have node installed. NPM is the node package manager.

  • Paul de Honor
    Paul de Honor Year ago +3

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

  • shweta mahure
    shweta mahure Year ago

    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

  • Mikey Cabana
    Mikey Cabana Year ago

    As per the the (changelog)[github.com/mongodb/node-mongodb-native/blob/3.0.0/CHANGES_3.0.0.md]
    we have to change this:
    const connection = (closure) => {
    return MongoClient.connect('mongodb://localhost:27017/mean', (err, db) => {
    if (err) return console.log(err);
    closure(db);
    });
    };
    to this:
    const connection = (closure) => {
    return MongoClient.connect('mongodb://localhost:27017/mean', (err, client) => {
    if (err) return console.log(err);
    let db = client.db('mean');
    closure(db);
    });
    };
    App will then work as expected.

  • Vidhya Sagar
    Vidhya Sagar Year ago +2

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

  • Edwin Martinez
    Edwin Martinez Year ago

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

  • Michael Morris
    Michael Morris Year ago +3

    @10:47 This command no longer works because it will install version 3.x of the node mongodb driver. The rest of the tutorial is written for 2.2.x. So use command
    npm install mongodb@^2.2.34 --save
    To pull a version of the driver compatible with the rest of the code used in the tutorial.

    • Rajesh Prabhu
      Rajesh Prabhu Month ago

      Man did i search this issue for hours. Thanks man. Solved the "db.collection is not a function" issue.

    • Bhanu Prakash
      Bhanu Prakash Year ago

      Okay. So is that the reason behind the error "db.collection is not a function"?
      I'm using Ubuntu 18.04 LTS

    • Hayden Witucki
      Hayden Witucki Year ago

      Thank you very much Michael.

  • Jorge Ibarra
    Jorge Ibarra Year ago +4

    I found another solution for the error given by db.collection if you´re using mongodb 3.x.x. First you have to install via npm the module mongojs and save it as a dependency. I´ll leave the code so that you can see how i did it:
    //// Code
    const express = require("express");
    const router = express.Router();
    const ObjectID = require("mongodb").ObjectID;
    const mongojs = require("mongojs");
    const db = mongojs("Name of the database", ["Name of the collection"]);
    // Error handling
    const sendError = (err, res) => {
    response.status = 501;
    response.message = typeof err == "object" ? err.message : err;
    res.status(501).json(response);
    };
    // Response handling
    let response = {
    status: 200,
    data: [],
    message: null
    };
    // Get users
    router.get("/users", (req, res, next) => {
    db.users.find((err, users) => {
    if (err) return next(err);
    response.data = users;
    res.json(response);
    });
    });
    module.exports = router;

    • Khanh Lê
      Khanh Lê Year ago

      You save my day

    • Matt Bakken
      Matt Bakken Year ago

      It just returns the client instead of the db itself. Weird, breaking change, but whatever
      Documentation for how to connect to MongoDB v3.0+ is here: github.com/mongodb/node-mongodb-native/blob/3.0.0/CHANGES_3.0.0.md#api-changes

    • Jorge Ibarra
      Jorge Ibarra Year ago

      I don´t know how mongojs works completely, but I guess that this line of code: "const db = mongojs("Name of the database", ["Name of the collection"]);" is similar as what you have above, but it has to be done this way because we´re using mongojs, which is a middleware that helps us to connect easily to MongoDB and do other stuff. Another middleware that I´ve used before for this task is mongoose, which for me is also great.
      I hope I helped you a little bit with my response and correct me if I´m wrong in anything :D

    • Akash Potdar
      Akash Potdar Year ago

      so we don't need use this part? const connection = (closure) => {
      // console.log(closure);
      return MongoClient.connect('mongodb://localhost:27017/mean', (err, db) => {
      if (err) return console.log(err);
      closure(db);
      });
      };

    • Jorge Ibarra
      Jorge Ibarra Year ago

      Glad to help :)

  • Kiran Mungekar
    Kiran Mungekar Year ago

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

  • Xia Wang
    Xia Wang Year ago

    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.

  • Darren Booker
    Darren Booker Year ago

    I am following your tutorial from your website. I keep getting this error and can't figure out why please help
    (node:17285) DeprecationWarning: `open()` is deprecated in mongoose >= 4.11.0, use `openUri()` instead, or set the `useMongoClient` option if using `connect()` or `createConnection()`. See mongoosejs.com/docs/connections.html#use-mongo-client

  • Ziteng Wang
    Ziteng Wang Year ago +6

    If you use MongoDB 3 and later, in server.js, db.collection will get a type error. Try this solution stackoverflow.com/a/47662979

    • Kade
      Kade Year ago

      Ziteng Wang I did downgrade because I couldn't fix the db.collection is not a function with the latest version. It was a quick fix. You are right...

    • Ziteng Wang
      Ziteng Wang Year ago

      LimCode don't do downgrade. We need to use the newer APIs when developing.

    • Kade
      Kade Year ago

      you can also fix the error by downgrading your mongodb v3 to mongodb: 2.2.31 and run npm install again. It will work fine. Thanks for the link

    • Ms.A
      Ms.A Year ago

      Thank you so much for posting this. Yeah I'm using MongoDB shell version v3.6.0. The solution by user MikaS in your link helped me.

  • Rigin Oommen
    Rigin Oommen Year ago

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

    • Dimitris Katsaros
      Dimitris Katsaros Year ago

      for the nmp start command you just have to install nodemon ( npm install -g nodemon ) and then run your server.js with the command nodemon server. What it does is watches over your project for any changes (save a change to any file) and automatically restarts your server. So now the only thing you have to do is run the ng build witch is pretty frustrating at a point after but i don't have any solution to that.

  • MrTimskii
    MrTimskii Year ago

    Great vid ! Thanks a lot.
    I tried to do the CRUD action by myself but it keeps giving an error in Postman.
    Do you know what's wrong with my code (post & put doens't work, Get does work) ? Thank you in advance !

    POST :
    router.post('/employees', (req, res) => {

    const employees = { name: req.body.name, age: req.body.age , wage: req.body.wage , place: req.body.place };
    db.collection('employees').insert(employees, (err, result) => {
    if (err) {
    res.send({ 'error': 'An error has occurred' });
    } else {
    res.send(result.ops[0]);
    }
    });

    });
    PUT :
    router.put('/employees/:id', (req, res) => {
    const id = req.params.id;
    const details = { '_id': new ObjectID(id) };
    const employee = { name: req.body.name, age: req.body.age , wage: req.body.wage , place: req.body.place };
    db.collection('employees').update(details, employee, (err, result) => {
    if (err) {
    res.send({'error':'An error has occurred'});
    } else {
    res.send(employee);
    }
    });
    });
    GET :
    router.get('/employees', (req, res) => {
    connection((db) => {
    db.collection('employees')
    .find()
    .toArray()
    .then((employees) => {
    response.data = employees;
    res.json(response);
    })
    .catch((err) => {
    sendError(err, res);
    });
    });
    });

    • Waseem Ullah Khan
      Waseem Ullah Khan Year ago

      Hello MrTimskii ,,, can u share your code with me for post and put .

    • MrTimskii
      MrTimskii Year ago

      Yes, i found my error .. thanks for taking time !

    • DesignCourse
      DesignCourse  Year ago +1

      Sorry, you would have much better luck posting your question at stackoverflow.com

  • Aakash Verma
    Aakash Verma Year ago +2

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

  • Milan
    Milan Year ago

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

  • Igor Chornyi
    Igor Chornyi Year ago

    Hey, thanks for your tutorial. I have a question about this URL "localhost:3000/api/users". Is it a good thing that user can go to the URL and see that JSON response and is there any way to forbid that? Maybe redirect to index.html or something?

  • Cam
    Cam Year ago

    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.

    • DesignCourse
      DesignCourse  Year ago

      Thanks, I'll do more CRUD in the future with an emphasis on CUD. ;)

  • Mehdi alaoui sossai

    hey do you how can i upload using MEAN4?
    thank you

  • Omer Mindivanli
    Omer Mindivanli Year ago +5

    This video is the most important tutorial video for mean stack development. I have not seen that kind of it

  • Jonathan Juarez
    Jonathan Juarez Year ago

    Really clean and straight to the point! Quick question. Is this how a project may be setup to be put into a production dist folder for heroku or aws deployment?

  • srinivas muralidharan

    It says too many Database when i travel to the url : api/users. What should be the solution for this?

  • Valkon
    Valkon Year ago +1

    Oh FINALLY Angular 4

  • James Block
    James Block Year ago

    This was a great video. Just what I was looking for! I do have a question though...
    What is the best way to implement a css preprocessor like sass. Would you delete the main styles.css file in the angular dist folder and replace it with a styles.sass file and then point node-sass-middleware's src and dist options at that dist folder? What about all the individual component stylesheet partials? Is there a clean easy way to use sass with them?
    Im sure ill figure it out if I play around with it a bit. I've been using node and express for a while and recently decided to tackle learning angular, but the version of angular has been changing so much and the lack of documentation on setting up node and angular to work together has been more then discouraging. Thanks again for the video!

  • Stan None
    Stan None 2 years ago

    nice!
    i like!