collection of bash-shell scripts to run various feathers examples quickly
Switch branches/tags
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md Update README.md Dec 2, 2018
chat-default.bsh Update chat-default.bsh Nov 30, 2018
chat-github.bsh Update chat-github.bsh Nov 30, 2018
chat-gmail.bsh Update chat-gmail.bsh Nov 30, 2018
custom-service-find-get.bsh Update custom-service-find-get.bsh Dec 1, 2018
example-1-in-memory-db.bsh Update example-1-in-memory-db.bsh Aug 30, 2018
example-2-real-time-api.bsh Update example-2-real-time-api.bsh Aug 30, 2018
example-3-client-use-REST.bsh Update example-3-client-use-REST.bsh Sep 11, 2018
example-3-client-use.bsh Update example-3-client-use.bsh Sep 10, 2018
github-hook.bsh Update github-hook.bsh Nov 30, 2018
github-login.bsh Update github-login.bsh Nov 30, 2018
gmail-hook.bsh Update gmail-hook.bsh Nov 30, 2018
gmail-login.bsh Update gmail-login.bsh Nov 30, 2018
gmail-service.bsh Update gmail-service.bsh Nov 30, 2018
init-cockroach-client.bsh Update init-cockroach-client.bsh Apr 19, 2018
init-cockroach-server.bsh Update init-cockroach-server.bsh Jun 29, 2018
init-feathers-setup.bsh Update init-feathers-setup.bsh Sep 12, 2018
init-mariadb-client.bsh Update init-mariadb-client.bsh Sep 12, 2018
init-mariadb-server.bsh Update init-mariadb-server.bsh Mar 26, 2018
init-timelinedb-server.txt Create init-timelinedb-server.txt Apr 6, 2018
jsgrid-sequelize.bsh Update jsgrid-sequelize.bsh Nov 30, 2018
sql-tiny.bsh Update sql-tiny.bsh Dec 7, 2018
testing-all-hooks.bsh Update testing-all-hooks.bsh Nov 30, 2018

README.md

FastFeathers

A collection of bash-shell scripts to install and run various Feathers examples very quickly.

Note: Please do not simply run these scripts without carefully reviewing this excellent Feathers tutorial.

All the Feathers examples utilize Tcl-Expect to automatically respond to the Feathers CLI questions. It is not required to have a separate VPS environment for a database connection, but it does make life more interesting. All database examples are using SSL connections. Testing has been done on Centos 7 / RHEL.

List Of Examples:

  1. turorial examples: (No other setup required.)

    -- in-memory-db-example.bsh - Worlds simplest and smallest example to see feathers in action.

    -- simple-real-time-api.bsh - Real-time API referenced in the tutorial, with a couple of extras.

  2. init-feathers-setup.bsh - Installs and Initializes the feathers enviroment. Required for every feathers example below.

  3. chat-default.bsh - this will quickly install the feathers tutorial chat example.

  4. chat-gmail.bsh - rework of the chat-default.bsh example, except this uses a Gmail address to log in.

  5. chat-github.bsh - rework of the chat-default.bsh example, except this uses a Github address to log in.

  6. gmail-login.bsh - simple example of using gmail to log in rather than the default authentication (Local Storage NeDB).

  7. gmail-hook.bsh - simple example of using gmail-login.bsh, but includes a hook to capture gmail information such as first name, etc

  8. gmail-service.bsh - example of using both gmail-login.bsh and gmail-hook.bsh, but also includes an SQL service to save Gmail information such as first name. This one has a very crude user-interface using the browser-console.

  9. github-login.bsh - example of using Github to log in rather than the default authentication (Local Storage NeDB).

  10. github-hook.bsh - example of using Github-login.bsh, but includes a hook to capture Gmail information such as first name, etc

  11. custom-service-find-get.bsh - a very simple example of a custom service using 'get' which reverses strings and using 'find' which either returns a directory (passing an object) or OS stuff (passing an id number).

  12. jsgrid-sequelize.bsh - Uses Js-grid.com as the front end user-interface. Options include either MariaDB or CockroachDB. The default is CockroachDB.

  13. test-all-hooks.bsh - used to test each and every possible hook to help determine execution order. Creates 42 hooks.

Databases

  1. init-mariadb-server.bsh - Install/initialize the MariaDB server for examples which require MariaDB.

  2. init-mariadb-client.bsh - (Optional) Install a MariaDB client for testing with init-mariadb-server.bsh

  3. init-cockroach-server.bsh - Install/initialize the CockroachDB server for examples which require CockroachDB or PostgreSQL.

  4. init-cockroach-client.bsh - (Optional) install a CockroachDB client for testing with init-cockroach-server.bsh

  5. init-timeline-server.txt - creates a timelineDB(postgresql) environment. this is not a bash-script (yet).

Tested Environments

  1. Digital Ocean droplets Centos 7
  2. Google Cloud VM instances Centos 7
  3. Amazon EC2 -- RHEL
  4. 123systems.net -- Centos 7

To Run:

  1. Create a VPS, and optionally a second one for database usage.

  2. (Gmail login examples only, suggested but not required for Github login) Obtain a Namecheap.com 99-cent domain name for testing Gmail login and point the "A" record of the IP of the VPS from the previous step.

  3. Create either a Gmail or a Github login:

    Gmail login: Visit the Google Oauth2 credentials page to create your credentials and get your Client ID and Client secret values. You will need to fill in Authorized Javascript origins (example: http;//fastfeathers.com:3030) and Authorized redirect URIs (example: http;//fastfeathers.com:3030/auth/google/callback) using your own domain name in the Oauth2 credentials page. More information is available on the Feathers website.

    Github login: Visit the Oauth Apps page to create your credentials to get your Client ID and Client secret values. You will need to fill in your Authorized callback URL (example: http;//123.123.123.123:3030/auth/github/callback) using your own IP number (or domain name) in theOauth Apps page.

  4. sudo yum --assumeyes install git;

    git clone https://github.com/edwardsmarkf/fastfeathers ;

  5. bash -vx ./fastfeathers/init-[[YOUR_DB_CHOICE]]-server.bsh; Required database server installation for all examples requiring database access. Optionally install and run the ./feathers/init-[[YOUR_DB_CHOICE]]-client.bsh on the Feathers server to make sure connectivity is working properly.

  6. bash -vx ./fastfeathers/feathers-initial-setup.bsh; Required for the feathers server.

  7. (Optional) Edit your choice of examples for the following (Or edit your ./config/default.json file after completion.)

    • HOST -- Domain name required for Google Oath2 login or IP number (or domain name) required for Github Oath2 login.
    • Client_ID & Secret_ID -- required for Google & Github Oath2 login.
    • DB_USER, DB_PASS, DB_NAME, SERVER_IP -- required for all examples that use a database, values are displayed after DB installation.
  8. bash -vx ./fastfeathers/YOUR_CHOICE.bsh ; substitute YOUR_CHOICE.bsh for your choice of examples.

  9. Instructions to run the feathers example will display on your terminal window.