Skip to content

boseca/crate-sample-apps

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crate Sample Apps

Overview

This repository contains implementations of a simple guestbook example app that uses Crate.IO as its database backend. The frontend is written in Javascript and communicates with the backend over a REST API. The REST API that connects to Crate.IO is written in various programming languages using different client libraries available for Crate.

Frontend

The frontend communicates via a REST API with the backend. The interface is the same across all implementations of the backend which allows for simple exchange of backends.

The code and usage instructions are in the frontend subfolder of this project.

Backends

The example application backends available are:

They are inside their respective subfolders and contain both usage instructions and commented application code.

Download and Install Crate.IO

For all backends you will need to install and run Crate.IO first. This sample app requires version 0.54.1 or higher. Several ways exist to get an instance of Crate running, visit our Getting Started section to find the one that works best for you.

Import Country Data

Once the Crate instance in running, create the schema and import country data. You need crash (Crate Shell) to connect to Crate.

crash < sql/schemas.sql
crash -c "COPY guestbook.countries FROM '$(pwd)/sql/countries.json'"

Develop

Backend API Spec

See the API spec.

Running Integration Tests

cd tests
python3.4 tests.py --host SERVER_IP --port 4200

About

Crate sample apps.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Erlang 41.3%
  • Python 21.7%
  • Java 15.4%
  • PHP 9.6%
  • JavaScript 5.5%
  • HTML 5.1%
  • CSS 1.4%