Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added contents to Express NodeJs #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions using_express_nodejs/README.md
Original file line number Diff line number Diff line change
@@ -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.