简体   繁体   中英

MEAN.JS Cannot connect MongoDB

I am newbie here, starting to learn MEAN.JS, As I installed everything and tried to run

grunt --force

on the command line, it returns an error like the image below. 在此处输入图片说明

Im using windows here and also I already installed MongoDB on the C:/Program Files path. Thanks in advance! :)

Getting started with the MEAN stack might seem very daunting at first. You might think that there is too much new technology to learn. The truth is that you really only need to know “Javascript.” That's right, MEAN is simply a javascript web development stack.

So, how do you actually get started developing on the MEAN stack?

The first step is to set up a project structure. I've found the following structure to make the most sense:

controllers/ db/ package.json server.js public/

This structure lets you keep the entire stack in a single project. Your AngularJS front end can go into the public folder while all your Express API logic goes into controller and your MongoDB collections and logic go into the db folder.

Now that you've set up a general project structure, you need to initialize your public folder as an Angular project. It is best to do this using a tool called Yeoman.

Yeoman is a toolkit that makes it easy for you to get started with a variety of Javascript frameworks and other web frameworks like Bootstrap and foundation. You can learn more about Yeoman at Yeoman.io.

Installing Yeoman is pretty straightforward.

You can read more here: http://www.citizentekk.com/mean-stack-tutorial-how-to-build-loosely-coupled-scalable-web-apps-nodejs-angularjs-applications/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM