{{ app_conf.environment }}

{{ crookse.package_name }}

Latest Release {{ crookse.latest_release }}

Last updated: {{ date_last_updated }}

Getting Started

crookse.Node is a Node.js library/framework that simplifies and improves HTTP resource creation, API endpoint routing, and error handling.


All URIs are associated with a resource class (a JavaScript constructor function). Each resource class defines its own set of HTTP methods that it allows, which follow this naming convention: HTTP_{REQUEST_METHOD}_{RESPONSE_OUTPUT}(). For example, if /home is associated with the HomeResource class and the HomeResource class only has HTTP_GET_JSON() and HTTP_POST_JSON() defined, then /home will only allow GET requests that send JSON responses and POST requests that send JSON responses. All other types of requests will receive a 405 (Method Not Allowed) response.

Example


npm

Git


Before you get started

  • This quickstart guide sets you up with a very basic application that can handle JSON, HTML, and XML. There are multiple tutorials on this site that set you up with different technology stacks from the ground up (e.g., React, Vue.js, static HTML). The links to the tutorials are in the sidebar.

Steps

  1. Create your server file.
  2. Start your server.
  3. Lastly, open your web browser and navigate to localhost:1337, localhost:1337?output=html, and localhost:1337?output=xml.

If you find that something is missing in these pages (or if you find that something needs more clarification), then please file an issue at https://github.com/crookse/crookse-node-docs/issues. I would love to hear from you! You can also send me an email.