Build a RESTful API Using Node and Express 4

# Express Router and Routes We will use an instance of the Express Router to handle all of our routes. Here is an overview of the routes we will require, what they will do, and the HTTP Verb used to access it. This will cover the basic routes needed for an API. # Route Middleware We’ve already defined our first route and seen it in action. Let’s say that we wanted something to happen every time a request was sent to our API. All we needed to do to declare that middleware was to use router.use(function()). We are sending back information as JSON data. We will also add next() to indicate to our application that it should continue to the other routes. Middleware Uses Using middleware like this can be very powerful. Testing Our Middleware Now when we send a request to our application using Postman, Something is happening will be logged to our Node console (the command line). With middleware, we can do awesome things to requests coming into our API. # Creating the Basic Routes
How to Auto-Save your model in Angular.js using $watch and a Debounce function. · Adam Albrecht
30 Oct 2013 The Problem Currently, I’m working on an Angular app that is very form-centric. Fields and fields and more fields. I want to make the form-filling process as quick and painless as possible, so I’m trying to implement auto-save. Update (March 19th, 2014) I’ve done quite a bit more auto-saving on my current project and I’ve updated my post with some slightly better methods. First Attempt My first attempt at an auto-save solution (while still being very new to Angular) was a directive that, based on the type of element, waited for either a change or blur event to occur and communicated to the controller (via a service) that it was time to save the model. <input type='text' ng-model='myModel.field1' auto-save /><select ng-model='myModel.field2' auto-save >... A simpler version of this method might look something like this: <input type='text' ng-model='myModel.field1' ng-blur='save()' /><select ng-model='myModel.field2' ng-change='save()' >... There are a few problems with this method:
Skeleton: Beautiful Boilerplate for Responsive, Mobile-Friendly Development
Unheap - A tidy repository of jQuery plugins
JavaScript Learning Resources | LinuxMaster.me
In my previous post Self-Taught JavaScript Bootcamp using Trello, I discussed my plan for learning JavaScript. If you haven’t had a chance to read through that post, you may want to check it out before continuing as it contains the structure for setting up your self-taught JavaScript course. Although the list below contains many of the best online resources, there are plenty of others that you could substitute or add in, allowing a better fit for your personal learning style. I have organized the learning material into sections. The lists are organized by type. The websites section contains links to sites that provide articles or learning paths regarding JavaScript. Although a few of these books are free, most must be purchased. I don’t listen to many podcasts specifically for JavaScript. Videos are an excellent way to quickly pick up a topic. This section is more of an optional section. The above resources are an excellent way to get started in programming with JavaScirpt.
Self-Taught JavaScript Bootcamp with Trello | LinuxMaster.me
JS Dev Board Over the past few months, I have been teaching myself JavaScript. Unfortunately, I have more resources than time to complete them. I currently work full time and do not have the option of attending a programming boot camp. Feeling comfortable with HTML and CSS, I have included a few resources for those topics, to build on the solid foundation I currently have in those technologies. Trello Blank Board First thing is to create a Trello account here. I have created a total of six lists as follows: JavaScriptFrameworks & ToolsDoneUp NextWorking OnDaily Cards can be created under the lists on the Trello board by clicking the “Add a card…”, typing a card title and hitting enter. Cards can have checklists added to them by clicking on the desired card, clicking on “Checklist” on the righthand side, typing a checklist title and finally clicking the green “Add” button”. Cards can also be labeled by color, in order to easily distinguish their purpose. JS Dev Board Lists
Related:
Related: