The nature of a Node.js application lends itself to many tiny servers running together in a cloud. Consequently, I end up making many little projects.
Whenever I begin a new node project, I begin with a call to express
. Not a bad start, but I usually want a little more boiler-plate code to begin. So, this project doesn't do anything itself, it is just the start to all my other projects...
Feel free to use it (you'd probably want to fork it), and change the project to suit your own needs.
Make sure you have the following engines installed locally:
Next, download the code and run the following to download the dependencies:
npm install
Start up the server, via:
node app.js
Finally, open up a browser and view the results:
http://localhost:3000/
You won't see much at this point, as everything is just a skeleton waiting for the flesh. However, the project does have some initial behavior that you may appreciate... or not.
Caveat: My projects usually only expose JSON objects through a REST interface. I do not have the server spend any cycles rendering HTML files. Instead, my projects serve static HTML files and the client renders the data into the web page using FuzzyToast calls.
What you do get from this project is the following: