telepat-io/telepat-api

View on GitHub

Showing 119 of 119 total issues

File user.js has 787 lines of code (exceeds 250 allowed). Consider refactoring.
Open

var express = require('express');
var router = express.Router();
var FB = require('facebook-node');
var Twitter = require('twitter');
var async = require('async');
Severity: Major
Found in controllers/user.js - About 1 day to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        function(callback) {
            if (Models.Application.redisClient)
                Models.Application.redisClient = null;
    
            var redisConf = app.telepatConfig.config.redis;
    Severity: Major
    Found in app.js and 1 other location - About 1 day to fix
    app.js on lines 361..389

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 313.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        function(callback) {
            if (Models.Application.redisCacheClient)
                Models.Application.redisCacheClient = null;
    
            var redisCacheConf = app.telepatConfig.config.redisCache;
    Severity: Major
    Found in app.js and 1 other location - About 1 day to fix
    app.js on lines 333..360

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 313.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    router.get('/get', function(req, res, next) {
        Models.User({id: req.body.user_id}, req._telepat.applicationId, function(err, result) {
            if (err && err.status == 404) {
                return next(new Models.TelepatError(Models.TelepatError.errors.UserNotFound));
            }
    Severity: Major
    Found in controllers/user.js and 1 other location - About 6 hrs to fix
    controllers/user.js on lines 759..770

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 164.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

        if (Object.getOwnPropertyNames(req.body).length === 0) {
            return next(new Models.TelepatError(Models.TelepatError.errors.RequestBodyEmpty));
        } else if (!Array.isArray(req.body.patches)) {
            return next(new Models.TelepatError(Models.TelepatError.errors.InvalidFieldValue,
                ['"patches" is not an array']));
    Severity: Major
    Found in controllers/user.js and 1 other location - About 6 hrs to fix
    controllers/admin/user.js on lines 163..171

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 164.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

        if (Object.getOwnPropertyNames(req.body).length === 0) {
            return next(new Models.TelepatError(Models.TelepatError.errors.RequestBodyEmpty));
        } else if (!Array.isArray(req.body.patches)) {
            return next(new Models.TelepatError(Models.TelepatError.errors.InvalidFieldValue,
                ['"patches" is not an array']));
    Severity: Major
    Found in controllers/admin/user.js and 1 other location - About 6 hrs to fix
    controllers/user.js on lines 947..955

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 164.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    router.get('/me', function(req, res, next) {
        Models.User({id: req.user.id}, req._telepat.applicationId, function(err, result) {
            if (err && err.status == 404) {
                return next(new Models.TelepatError(Models.TelepatError.errors.UserNotFound));
            }
    Severity: Major
    Found in controllers/user.js and 1 other location - About 6 hrs to fix
    controllers/user.js on lines 801..812

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 164.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

        } else if (loginProvider == 'twitter') {
            if (!req.body.oauth_token)
                return next(new Models.TelepatError(Models.TelepatError.errors.MissingRequiredField, ['oauth_token']));
            if (!req.body.oauth_token_secret)
                return next(new Models.TelepatError(Models.TelepatError.errors.MissingRequiredField, ['oauth_token_secret']));
    Severity: Major
    Found in controllers/user.js and 1 other location - About 6 hrs to fix
    controllers/user.js on lines 446..461

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 162.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

        } else if (loginProvider == 'twitter') {
            if (!req.body.oauth_token)
                return next(new Models.TelepatError(Models.TelepatError.errors.MissingRequiredField, ['oauth_token']));
            if (!req.body.oauth_token_secret)
                return next(new Models.TelepatError(Models.TelepatError.errors.MissingRequiredField, ['oauth_token_secret']));
    Severity: Major
    Found in controllers/user.js and 1 other location - About 6 hrs to fix
    controllers/user.js on lines 220..230

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 162.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        if (loginProvider == 'facebook') {
            if (!req.body.access_token)
                return next(new Models.TelepatError(Models.TelepatError.errors.MissingRequiredField, ['access_token']));
            if (!app.telepatConfig.config.login_providers || !app.telepatConfig.config.login_providers.facebook)
                return next(new Models.TelepatError(Models.TelepatError.errors.ServerNotConfigured,
    Severity: Major
    Found in controllers/user.js and 1 other location - About 5 hrs to fix
    controllers/user.js on lines 212..230

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 146.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        if (loginProvider == 'facebook') {
            if (!req.body.access_token)
                return next(new Models.TelepatError(Models.TelepatError.errors.MissingRequiredField, ['access_token']));
            if (!app.telepatConfig.config.login_providers || !app.telepatConfig.config.login_providers.facebook)
                return next(new Models.TelepatError(Models.TelepatError.errors.ServerNotConfigured,
    Severity: Major
    Found in controllers/user.js and 1 other location - About 5 hrs to fix
    controllers/user.js on lines 438..461

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 146.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Function objectACL has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
    Open

    security.objectACL = function (accessControl) {
        return function(req, res, next) {
            if (!req.body || !Object.getOwnPropertyNames(req.body).length) {
                return next(new Models.TelepatError(Models.TelepatError.errors.RequestBodyEmpty));
            }
    Severity: Minor
    Found in controllers/security.js - About 4 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    File object.js has 369 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    var express = require('express');
    var router = express.Router();
    var Models = require('telepat-models');
    var security = require('./security');
    var microtime = require('microtime-nodejs');
    Severity: Minor
    Found in controllers/object.js - About 4 hrs to fix

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

                  if (Models.Application.loadedAppModels[appId].email_templates &&
                      Models.Application.loadedAppModels[appId].email_templates.reset_password) {
                      messageContent = Models.Application.loadedAppModels[appId].email_templates.reset_password.
                          replace(/\{CONFIRM_LINK}/g, redirectUrl);
                  } else {
      Severity: Major
      Found in controllers/user.js and 1 other location - About 4 hrs to fix
      controllers/user.js on lines 615..623

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 126.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

                          if (Models.Application.loadedAppModels[appId].email_templates &&
                              Models.Application.loadedAppModels[appId].email_templates.confirm_account) {
      
                              messageContent = Models.Application.loadedAppModels[appId].email_templates.confirm_account.
                                  replace(/\{CONFIRM_LINK}/g, url);
      Severity: Major
      Found in controllers/user.js and 1 other location - About 4 hrs to fix
      controllers/user.js on lines 1107..1114

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 126.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

                              if (err && err.status == 404) {
                                  req.body.id = uuid.v4();
                                  Models.Subscription.addDevice(req.body, function (err, result) {
                                      if (!err) {
                                          return res.status(200).json({status: 200, content: {identifier: req.body.id}});
      Severity: Major
      Found in controllers/device.js and 1 other location - About 3 hrs to fix
      controllers/device.js on lines 90..131

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 113.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

              if (!udid) {
                  req.body.id = uuid.v4();
                  Models.Subscription.addDevice(req.body, function (err, result) {
                      if (!err) {
                          return res.status(200).json({status: 200, content: {identifier: req.body.id}});
      Severity: Major
      Found in controllers/device.js and 1 other location - About 3 hrs to fix
      controllers/device.js on lines 114..124

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 113.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

          if (Object.getOwnPropertyNames(req.body).length === 0) {
              return next(new Models.TelepatError(Models.TelepatError.errors.RequestBodyEmpty));
          } else if (!req.body.email) {
              return next(new Models.TelepatError(Models.TelepatError.errors.MissingRequiredField, ['email']));
          }
      Severity: Major
      Found in controllers/admin/app.js and 1 other location - About 3 hrs to fix
      controllers/admin/app.js on lines 276..280

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 102.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

          if (Object.getOwnPropertyNames(req.body).length === 0) {
              return next(new Models.TelepatError(Models.TelepatError.errors.RequestBodyEmpty));
          } else if (!req.body.email) {
              return next(new Models.TelepatError(Models.TelepatError.errors.MissingRequiredField, ['email']));
          }
      Severity: Major
      Found in controllers/admin/app.js and 1 other location - About 3 hrs to fix
      controllers/admin/app.js on lines 352..356

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 102.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      File app.js has 294 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      var express = require('express');
      var bodyParser = require('body-parser');
      var http = require('http');
      var https = require('https');
      var urlParser = require('url');
      Severity: Minor
      Found in app.js - About 3 hrs to fix
        Severity
        Category
        Status
        Source
        Language