         else
             res.send 400
 
+    # Define post function.
     definePost      : (model) =>
         @app.post '/api/' + model, (req, res) =>
             @updateOrCreate model, req, res
 
+    # Define put function.
     definePut       : (model) =>
         @app.put '/api/' + model + '/:id', (req, res) =>
             @updateOrCreate model, req, res
 
+    # Set all routes for all the models.
     defineAllRoutes : () =>
         ressources  = []
         for model of @db.models

            catch e
                res.send 400

    updateOrCreate  : (model, req, res) =>
        if not req.body.id or req.body.id is req.params.id
            obj = new @models[model] req.body

        @models         = []
        @configured     = false

    # Get informations from the database with a model and by id.
    defineGet       : (model) =>
        @app.get '/api/' + model, (req, res) =>
            if req.query
