Preparing your Windows box for AWS and a MEAN (Node) website: Setup your MEAN.js website
--
I walk through step by step how to get the Node.JS MEAN.JS scaffolded site working on a Windows 10 machine. This section is where you use the Yeoman (yo) code generator tool to create a template MEAN.JS website.
Go to parent article — Build a robust MEAN website in under an hour for less than $1/day — part 1
Go to previous article —Preparing your Windows box for AWS and a MEAN (Node) website: Install NPM libraries
If you already have the website running then go to the next article — Preparing your Windows box for AWS and a MEAN (Node) website: git init
Building our MEANJS scaffold website
Let’s go back to the c: drive in our bash window.
Open a new Git Bash window and type
cd c:
Let’s make a directory for our work and then navigate to that directory.
mkdir projectscd projects
We’ll make a directory for our website, and call it “awesomewebsite”. Because, it’s awesome.
mkdir awesomewebsitecd awesomewebsite
Let’s setup our scaffold site now.
yo meanjs
If you want to skip running npm install during install, use this parameter: yo meanjs --skip-install
I hit the down arrow key twice, even though I can’t see the cursor move. We are working with 0.4.2 in this example.
If you like, instead of hitting down arrow, hit enter to work with the latest version 0.5-beta on master.
I type in my website folder name, because the word awesome reminds me of “thedude”
The questions go on. You can either hit enter to all of them or enter your own words. Here are my responses as demonstrated above.
What mean.js version would you like to generate? 0.4.2 (down arrow twice)
In which folder would you like the project to be generated? thedude
What would you like to call your application? thedude
How would you describe your application? Stack JavaScript with MongoDB (these are for search keywords)
What is your company/author name? CodingJoe
Would you like to generate the article example CRUD module? Y
Would you like to generate the chat example module? Y
Now we wait. And wait. And wait. (if you want to skip this several minute wait next time, you can use the yo parameter “--skip-install” to skip over having yo run “npm install”.
Now let’s test this when we get back to the prompt.
Type this when the blinking cursor and prompt becomes available
cd thedudegrunt
If you got the error and you don’t want to install Ruby and Sass you can bypass for now by running “grunt --force”.
Make sure to grant access to the firewall if you are prompted.
The screen should look like this to show that you are running. (If you got a can’t connect to Mongo, did you forget to startup Mongo with mongod.exe or did you stop the service?)
Now open a browser window and go to this website
Amazing, it works. Woohoo!
Go to parent article — Build a robust MEAN website in under an hour for less than $1/day — part 1
Go to previous article — Preparing your Windows box for AWS and a MEAN (Node) website: Install NPM libraries
Go to next article — Preparing your Windows box for AWS and a MEAN (Node) website: git init