diff --git a/using_express_nodejs/README.md b/using_express_nodejs/README.md index febacdd..d692c13 100644 --- a/using_express_nodejs/README.md +++ b/using_express_nodejs/README.md @@ -1,2 +1,26 @@ # Using Express NodeJS +#####Express is a minimal and flexible node.js web application framework, providing a robust set of features for building single and multi-page, and hybrid web applications. + +####Installing Express: +>$npm install -g express + +######This installs some core Express functionality right into our Node installation, making it available globally so we can use it anywhere we want. That's handy. You'll see a bunch of text in your command prompt, mostly a lot of http 304's and GETs. That's fine. Express is now installed and available. + +####Create an app: +>$express myapp + +######Now we have some basic structure in there, but we're not quite done. You'll note that the express installation routine created a file called package.json in your myapp directory. + +####Installing dependencies: +>$cd myapp +>>$npm install + +######Once NPM has run its course, you should have a node_modules directory which contains all of the dependencies defined.You now have a fully-functioning app ready and waiting to run. Before we do that, though, we need to do one quick thing to prepare for setting up our database later. +>$mkdir data + +######That's where we're eventually going to store our MongoDB data. If that directory doesn't exist, the database server will choke when we go to run it later. We're not doing anything with it right now, though, so let's test out our web server! Type the following: +>$npm start + +######Open a browser and type localhost along with the port number where you will see a welcome to Express page. +######You are now running your own Node JS webserver, with the Express engine and Jade HTML preprocessor installed.