For starters, let's verify Node is working, by creating a very basic server; we'll get into more details in the next Chapter 4, Implementing RESTful Services with Node, but now we just want to make sure everything is fine. In other chapters, we will use Node more seriously, but the objective here is to verify that it works OK.
Checking Node's setup
How to do it...
Getting ahead a bit, let's set up a very basic server, which will answer all the requests by sending back a 'Server alive!' string. For this, we will need to follow three steps:
- Use require() to import the http module of Node—we'll see more on modules in the next section; for the time being, just assume that require() is...