An Introduction to Web ApplicationsĀ
w/ Express
"I BUILD WEB APPLICATIONS and WROTE THIS SONG ABOUT EXPRESS"
~Madonna
Web Browser or Client
Web Server / Scripting Language
Database
HTTP / Hyper Text Transfer Protocol
( GET / POST / PUT / DEL )
http://nodejs.org/download/
What is NodeJS?
NodeJS is a server-side scripting language. A browser communicates to NodeJS on the server via HTTP packets.
What is Express?
# - These lines are only notes, don't type into your terminal
$ - These lines are the money lines...aka type them
# Create a new directory on your desktop
$ mkdir express-less
# Change into that directory
$ cd express-less
# Initialize the directory for a NodeJS application...and many happy returns
$ npm init
# Install Express
$ npm install express --save
#YOU NOW HAVE AN EMPTY EXPRESS APPLICATION...BOOOORING.
"Fast, unopinionated, minimalist web framework for NodeJS"
# - These lines are only notes, don't type into your terminal
$ - These lines are the money lines...aka type them
# Install the express generator, the -g flag installs GLOBALLY
$ npm install express-generator -g
# Use the generator to GENERATE an application
$ express express-yourself
# Change into the directory and npm install
$ cd express-yourself && npm install
#YOU NOW HAVE AN EXPRESS APPLICATION WITH SOME MEAT....COOOOOL :D
#FIRE IT UP
$ npm start
Let's Check it Out...