Skip to content

A web application (with multiple API project options) that uses MariaDB!

License

Notifications You must be signed in to change notification settings

mariadb-corporation/dev-example-orders

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Orders

⚠️ [UNMAINTAINED] This repository has been moved and is currently maintained here. ⚠️


Orders is a web application that introduces you to the power, performance, and simplicity of MariaDB by simulating online eCommerce (ordering) traffic.

This README will walk you through the steps for getting the Orders web application up and running using MariaDB. To ensure success, please follow the instructions in order.

Note: The code provided within this repository is completely open source. Please feel free to use it as you see fit.

Table of Contents

  1. Requirements
  2. Getting started with MariaDB
  3. Getting started with the app
    1. Get the code
    2. Create the schema
    3. Anatomy of the app
    4. Build and run the app
  4. Requirements to run the app
  5. Support and contribution
  6. License

Requirements

This sample application, no matter which API project you target, will requires the following to be installed/enabled on your machine:

Getting started with MariaDB

MariaDB is a community-developed, commercially supported relational database management system, and the database you'll be using for this application.

If you don't have a MariaDB database up and running you can find more information on how to download, install and start using a MariaDB database in the MariaDB Quickstart Guide.

Get started with the app

In order to run the Orders application you will need to have a MariaDB instance to connect to. For more information please check out "Get Started with MariaDB".

Get the code

Download this code directly or use git (through CLI or a client) to retrieve the code using git clone:

$ git clone https://github.com/mariadb-corporation/dev-example-orders.git

Create the schema

Connect to the database and execute the following:

$ mariadb --host host_address --port #### --user user_name -p**** < schema/create.sql

or executing the SQL within (create.sql)(schema/create.sql) directly

CREATE DATABASE orders;

CREATE TABLE orders.orders (
  description varchar(25) 
) ENGINE=InnoDB;

Anatomy of the app

This application is made of two parts:

  • Client
    • communicates with the API.
    • is a React.js project located in the client folder.
  • API
    • uses a MariaDB Connector to connect to MariaDB.
    • contains multiple projects, located in the api folder.

See the README's in client and api for more information on how to get started!

Build and run the app

  1. Navigate to the client folder and execute the following CLI command to install the package dependencies for the React.js application.
$ npm install
  1. Pick an API project and follow the instructions of the README to build and run the API project.

  2. Navigate to the client folder and execute the following CLI command to start the React.js application.

$ npm start

Support and Contribution

Please feel free to submit PR's, issues or requests to this project project or projects within the official MariaDB Corporation GitHub organization.

If you have any other questions, comments, or looking for more information on MariaDB please check out:

Or reach out to us diretly via:

License

License