So in the last post we went over the project structure. This time, we’ll actually modify some of the code to create our own RESTful web service.
If you don’t know what a RESTful web service is, you should check out the wikipedia entry for it.
As discussed in the previous post, all of our routes are defined in files located in the routes folder which are then referenced and collated in the app.js file. So, to create our own RESTful API, we need to do something in this area.
Lets checkout the
index.js file and see whats in it. Continue reading
Now that we have a basic express web app created, lets go through the project structure.
In the last post we briefly went through the purpose of package.json. Now its time to go through it in bit more detail. As the extension
.json indicates, data in this file is in
json format. Yours should look something like this: Continue reading
Most of us think linearly, that is step by step, from start to finish. Think about making something physical, like a wooden table. Your mind quickly starts creating steps leading to that goal. Something like this feels familiar?
- Buy lots of raw wood.
- Buy sandpaper.
- Buy varnish.
- Make four legs.
- Make table top.
- Apply sandpaper.
- Join it all up.
- Apply varnish.