Ajoutez votre grain de sel personnel… (facultatif)

Eric's Blog

Here is a memo on how you can create a simple web server delivering static content with Node.js and and Express. The content could be html files, js, css or any other kind of files that doesn’t require server processing (like PHP, C#, Java, …).

But why Node.js instead of using Apache or IIS? Like you are going to see in the few lines below creating a web server with Node.js takes only few lines of code and can be up and running in 30 seconds (max!). When your purpose is only to test things the configuration of a “traditionnal” web server can be overkill.

A couple of days ago I played with the WebSocket API (HTML5 rocks!) by creating a WhiteBoard that can be used by several users at same time (see it on Github). With Node.js and Express I could quickly setup a web server that delivery…

View original post 117 more words

Advertisements
Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: