ExamplesΒΆ

Learning by example is a great way to learn a new framework. We have create a set of examples in Github to help you understand how to use Carbon.io.

  • Hello World - A simple Hello World service.

  • Simple Command-line App - A simple command-line application.

  • Test Suites - This example illustrates how to make test suites using test-tube.

  • Parameter Parsing - A Hello World service that illustrates the use of parameter and response definitions.

  • Microservice chaining - A Hello World service. This example illustrates microservice chaining/proxying where one microservice uses another microservice as part of its implementation.

  • API Key Authentication - A Hello World service. This example illustrates the central ideas of authentication and access control. API key authentication is implemented by MongoDBApiKeyAuthenticator and access control is defined in an ACL.

  • MongoDB - A Hello World service. This example illustrates:

    • how to build services with multiple endpoints using multiple modules / source files
    • how to interact with MongoDB
    • the use of exceptions for communicating HTTP errors to the client
    • the use of sub-endpoints and path parameters
    • the use of environment variables
  • Zipcode service - A service for managing zipcodes. This example illustrates the use of MongoDBCollections to create microservices.

  • Contacts API - A service for managing contacts. The API provides for the management of users and allows each user to manage their own set of contacts. This example illustrates advanced use of Collections, Authenticators, and ACLs.