What is MEAN?
The MEAN stack is comprised of four pieces of software:
- MongoDB - Stores JSON Objects
Lets get Started!
We’re going to start with a simple project.
- Make a new folder
- Jump into that folder
- Start our node project
For now we can keep everything default except for the
entry point which we’ll change to
Our directoy will now be filled with a new filed called
Node projects are configured within package.json. Our new file should look like this:
It’s okay to delete everything we don’t need for our sample project.
Creating our sample project
Our project is currently missing a file, so go ahead a create a new filed named
Inside we’re going to tell our Node App to send a message to the console.
server.js type in the following code:
Running our sample project
Now that we’ve finished writing our sample project, we can run it by typing in
node server.js inside the terminal.
Congrats! You’ve just set up your first Node Project!
Spent some time learning more about the
Console in the Node Documentation
You can find the sample code for this project here.