{{ app_conf.environment }}

{{ crookse.package_name }}

Latest Release {{ crookse.latest_release }}

Last updated: {{ date_last_updated.datetime }} | View changes on GitHub

Roadmap


  • This roadmap serves as a "goals" list and nothing more. The version numbers and release dates may shift for different reasons (e.g., development being focused more on bug fixes, code refactoring, code prepping, etc.).
  • The [ ] boxes are for tracking purposes. If there's an x in the box, then that means the feature/task has been completed.

The roadmap is currently empty. All features have been developed and no new features are currently in the pipeline for future releases.

History


Latest Release

This release has breaking changes. Please see the Deprecated Reference page for migration guides on all code with a removal date of October 1, 2018.

TLDR

crookse.Node is now a fully-tested and -covered, zero-dependency package. The CrookseNode.Server object's request-response cycle has been simplified further and now allows for serving static paths/files without the help of the router package.

What's New?

  • Added method for routing static paths. See the Reference page here to learn more.
  • The creation of the Node.js server via http.createServer() in CrookseNode.Server can be overridden. See the Reference page here to learn more.

Fixes

N/A

Improvements

  • The code base is more semantic, has been simplified further, and has 0 dependencies
  • Added Mocha tests (code coverage is at 100%)
  • Added ESLint (lint configs use Google's style guide)
  • Order of operations in the default request-response cycle has been optimized

Roadmap Used

Tentative Release Date: October 1, 2018

  • [x] Remove code: {CrookseNode.Server}.router. Reason: One of the main principles of crookse.Node is to be independent and enforce the use of raw Node logic. Node is great at handling HTTP requests and sending responses, but it is more powerful than just that. Node can execute the same logic from the most popular libraries with less code and further guide you to relying on your code rather than depending on someone else's code. Although crookse.Node is a framework, it is skim and overridable to guide users towards creating their own framework(s) and/or structure(s).
  • [x] Remove code: {CrookseNode.Server}.addTemplateEngine()
  • [x] Remove code: {CrookseNode.Server.{configs}}.http.response.headers
  • [x] Remove code: CrookseNode.Task.HttpRequest
  • [ ] Documentation: How to build static HTML pages and deploy them to Firebase Hosting
  • Add {CrookseNode.Server}.createNodeServer() to allow "creating of the server's Node.js server" to be overridden. Currently, CrookseNode.Server objects set their node_server property to http.createServer(). This isn't helpful if users want to use HTTPS or HTTP/2 Node.js servers; therefore, an overridable method will be provided so that users can change the way a CrookseNode.Server object creates it Node.js server.
  • Add {CrookseNode.Server}.createRouter() to allow "creating of the server's router" to be overridden. Currently, CrookseNode.Server objects set their router property to new Router(). No use cases exist that provide a reason to make this logic overridable, but the crookse.Node package is meant to be flexible enough to fit the needs of any user/application.

TLDR

Minor fix

What's New?

N/A

Fixes

Remove check on configs.server_id when creating a server. CrookseNode.createServer() should only check configs.id.

Improvements

N/A

Roadmap Used

N/A

TLDR

Minor fix

What's New?

N/A

Fixes

Fix sample config variable

Improvements

N/A

Roadmap Used

N/A


TLDR

Servers can now use HTTPS.

What's New?

Added hosts.protocol config to server configs so that HTTP and HTTPS servers can be created. See the configs at Reference#CrookseNode.Server.configs.

Fixes

N/A

Improvements

N/A

Roadmap Used

None


TLDR

Added tutorials on building React apps, Vue apps, GitHub Pages apps, and Firebase apps with example code. Tutorials are written to help you build your app from the ground up.

What's New?

  • Documentation pages now include:
    • Firebase Tutorial #1: Build a Firebase Cloud Functions app and deploy it to Firebase
    • GitHub Pages Tutorial #1: Build a GitHub Pages app and deploy it to GitHub
    • React Tutorial #1: Build a client-side React app written purely in plain JavaScript
    • React Tutorial #2: Build a client-side React app using JSX, Babel, and @babel/preset-react
    • React Tutorial #3: Build a client-side React app using JSX, ES6 classes, Babel, and @babel/preset-react
    • React Tutorial #4: Build a client-side React app using JSX, ES6 classes, Babel, @babel/preset-env, and @babel/preset-react
    • React Tutorial #5: Build a server-side React app using ReactDOMServer
    • Vue Tutorial #1: Build a client-side Vue app
    • Vue Tutorial #2: Build a client-side Vue app that receives its data from the server
  • {CrookseNode.Server}.addHttpResources() can now take an array of resources

Fixes

Fix typos in code and in documentation

Improvements

  • Clean up comments
  • Add additional checks that throw errors when exported resource class object is wrong
  • Remove files and code no longer needed

Roadmap Used

Tentative Release Date: September 24, 2018

  • [x] Deprecate code: {CrookseNode.Server}.router (docs in progress)
  • [x] Documentation: How to build a React app (Server-side with ReactDOMServer)
  • [x] Documentation: How to build a React app (Client-side with ReactDOM)
  • [x] Documentation: How to build a React app (Client-side with ReactDOM, JSX, Babel, and @babel/preset-react)
  • [x] Documentation: How to build a React app (Client-side with ReactDOM, JSX, ES6 classes, Babel, and @babel/preset-react)
  • [x] Documentation: How to build a React app (Client-side with ReactDOM, JSX, ES6 classes, Babel, @babel/preset-env, and @babel/preset-react)
  • [x] Documentation: How to build a Vue app
  • [x] Documentation: How to build static HTML pages and deploy them to GitHub Pages
  • [x] Documentation: How to build Firebase Cloud Functions apps and deploy them to Firebase Functions
  • [x] Allow {CrookseNode.Server}.addHttpResources() to take an array of resources. Currently it takes an associative array and a string.
  • Code coverage: CrookseNode
  • Code coverage: CrookseNode.Server
  • Code coverage: CrookseNode.Logger.BaseLogger
  • Code coverage: CrookseNode.Logger.ConsoleLogger
  • Code coverage: CrookseNode.Logger.FileLogger
  • Code coverage: CrookseNode.Utils
  • Documentation: How to integrate Angular
  • Documentation: How to integrate React (Server-side ReactDOMServer with client-side ReactDOM.hydrate())

TLDR

Quicker quickstart, cleaner README, and improved documentation pages.

What's New?

Quickstart code gets you straight to a working web app that supports JSON, HTML, and XML requests.

Fixes

Fix issue where the server tried attaching the request and response objects to an undefined resource object.

Improvements

N/A

Roadmap Used

  • [x] Quicker quickstart
  • [x] Allow CrookseNode.createServer() to take in a string and build a server object with default configs.
    var CrookseNode = require('crookse-node');
    
    var server = CrookseNode.createServer('Server-1');
    server.run();
  • [x] Update README.md to only include information that gets users started quickly. All other information should be put into a Documentation Pages section that includes links to this documentation site.
  • [x] Add MIT license
  • [x] Improve deprecated code references and migration guides

TLDR

  • Fixed issue where resource objects didn't have access to the request and response objects.

What's New?

  • N/A

Fixes

  • Fix issue where resource objects were being created and not given access to the request and response objects. This prevented resource objects from calling self.response and self.request. Resource objects need self.response so they can call self.response.end().

Improvements

  • N/A

TLDR

  • Removed test code in sample application.

What's New?

  • N/A

Fixes

  • Fix warning message in console being thrown because of test code (addTemplateEngine()) in sample app.

Improvements

  • N/A

TLDR

  • Deprecated logic (to be removed on October 1, 2018) and sample app includes more features.

What's New?

  • Sample app includes code that overrides the server's handleHttpRequest() method
  • Sample app shows how to add another application (HttpUtils), which is just a standard object
  • Sample app has an AboutMeResource class retrievable at /about-me
  • Request header "Response-Output" can be used to set the response output (?output={some_output} URL query param takes precedence)

Fixes

  • Fix URL query param parsing when two params are the same. If two params are the same, then the last one is used.

Improvements

  • DRY up code
  • Deprecate unnecessary abstractions
  • Remove unnecessary abstractions

Roadmap Used

  • 1.3.0 (tentative release date: August 28, 2018)
    • [x] Deprecate CrookseNode.Task.HttpRequest (to be removed on October 1, 2018). This code abstracts raw Node.js logic and that kind of abstraction is discouraged in this package.
    • [x] Deprecate configs.http.response.headers config (to be removed on October 1, 2018). The code that uses this config can be written by the user.
    • [x] Deprecate CrookseNode.Server.addTemplateEngine() (to be removed on October 1, 2018). This code is messy. CrookseNode already has addApplication and that should be used.
    • [x] Move sample app to sample-app directory with all sample files and let the sample app use the sample files to better provide a working, small-scale web application.
    • [x] Improve quickstart
    • [x] Add template engine code in sample application
    • [x] Documentation: How to integrate with Google Cloud Functions (quick summary)
    • [x] Documentation: How to send HTML responses Sample code is included in the sample application (see application.js, resource.home-resource.js, and template.home-resource.pug)

TLDR

  • Added tagged loggers, updated documentation, and improved code.

What's New?

  • Tagged logging (see documentation)
  • Documentation
  • Quicker quickstart

Fixes

  • N/A

Improvements

  • Cleaned up code
  • Throwing more errors (errors in console are highlighted in red)
  • Code prevents bad setups

TLDR

  • Fixed issue with router not honoring URI path params and added small sample application that shows how a CrookseNode.Server works.

What's New?

  • {CrookseNode.Server}.handleHttpRequest automatically defaults to {CrookseNode.Server}.defaultHandler_handleHttpRequest().
  • Request objects now have a getPathParam() method to get a param from their pathname. For example, if the request pathname format is /accounts/:account_id and a request is made to /accounts/12345, then request.getPathParam('account_id') would return 12345.
  • Add sample.application.js. This small sample application shows how a CrookseNode.Server works in its most basic form. Run it like so:
    $ node /path/to/crookse-node/sample.application.js

    When the above command is executed, the console should output something like:

    2018-08-16 19:03:57.510 EDT | Server-1 | TRACE | Resource class 'Home' added.
    2018-08-16 19:03:57.517 EDT | Server-1 | INFO | Running at http://localhost:2710/. Process PID: 29579

    If the output looks like the above, then the server should be reachable at localhost:2710. Go there and you should get the following response from the application:

    {"status_code":200,"body":{"some":"default_data_here"}}

Fixes

  • Fix issue with router not honoring URI path params. For example, the router would not associate :param in /some/path/:param with the request. That means the request would never know how to handle :param if it ever needed to. Request objects should be able to handle their own path params just like they handle their own HTTP method vars (or URL query parameters if you're used to calling them that).

Improvements

  • N/A

TLDR

  • Fixed issue where error response status code wasn't being set correctly.

What's New?

  • N/A

Fixes

  • Fix setting of the default status code for error responses in {CrookseNode.Server}.handleHttpRequestError(). The response status code was being set via response.statusCode(code), but statusCode is not a function. This threw an error that the server would never handle.

Improvements

  • N/A

TLDR

  • Updated README file to correctly state how errors are handled.

What's New?

  • N/A

Fixes

  • Fixed incorrect statement in README.md (see TLDR above).

Improvements

  • N/A

TLDR

  • Code cleanup.

What's New?

  • Nothing new. Maybe next time!

Fixes

  • No bugs found.

Improvements

  • Make sure file marker comments are labeled with "FILE MARKER" for easy searching.
  • Setup CrookseNode.Utils.getDateTimeISO() for handling all UTC offsets (will be released in a later version).

TLDR

  • Fixed a small bug fix and cleaned up some code.

What's New?

  • Nothing new. Maybe next time!

Fixes

  • Call self.beforeLog() and not beforeLog(). Calling self will allow beforeLog() to be overridden by users.

Improvements

  • Improve code documentation.
  • DRY up lib/exception.js.

TLDR

  • Fixed sample resource file to match new requirements.

What's New?

  • Nothing new. Maybe next time!

Fixes

  • Change key name in sample resource file (sample.resource.js) from constructor to class.

Improvements

  • Nothing improved. Maybe next time!

TLDR

  • Fixed minor bug and cleaned up code comments.

What's New?

  • Add documentation to README.md

Fixes

  • Remove duplicate log message in lib/task.http-request.js. The "Request Received" message occurs in {CrookseNode.Server}.run().

Improvements

  • Clean up code comments.

TLDR

  • HTTP resources can now be added without the use of fs. This gives you control over how you want crookse.Node to register your HTTP resources.

What's New?

  • Add new method to add HTTP resources that doesn't require the fs package.
  • Old method still exists.
  • New method takes an associative array of resource information. This leaves it up to the user to decide if they want to use fs or not. Users can use fs via the old method or read their own irectories before passing in the correct data structure to the addHttpResources() method.
  • Examples of method usage:

    Old way

    server.addHttpResources(__dirname + '/path/to/resources');

    New way

    server.addHttpResources({
      IndexResource: {
        paths: ['/'],
        class: function IndexResource() {
          var self = this;
          self.data = {};
          self.HTTP_GET_JSON = function HTTP_GET_JSON() {
        	self.sendResponse();
          }
        }
      },
      AboutResource: {
        paths: [
          '/about-me',
          '/about-me/'
        ],
        class: function AboutMeResource() {
          var self = this;
          self.HTTP_GET_JSON = function HTTP_GET_JSON() {
        	self.sendResponse();
          }
        }
      }
    });

TLDR

  • Improved code and added a new exception class to throw when bad object construction occurs.

What's New?

  • Add ObjectConstrcutorException class for cases where bad object construction occurs. This is useful if a resource doesn't have a class name (e.g., function() { } instead of function MyClass() { }).
  • Resources with empty data sets now return {} instead of null. This seems to be the better way to go because {} shows that the resource works, but doesn't have any data to return.

Fixes

  • No bugs found.

Improvements

  • Add missing function docblocks.
  • Organize code.

  • Remove Pug package. Pug is no longer the default template engine. Template engines are to be defined by the user.

Package CrookseNode created with namespaces:

  • Applications
  • Exception
  • Dictionary
  • HttpStatusCodes
  • Logger
  • Server
  • Servers
  • Task
    • HttpRequest
  • Utils