Awesome
feathers-ottoman-demo
This project is used for testing feathers service against feathers-ottoman
database adapter
Prerequisite
- Navigate to
/docker-compose
- Run
docker-compose up -d
- Wait 5-10 sec for all services to fully initialized
- Launch a command prompt and run
docker exec -it couchbase bash
- Once inside the container, run
cd scripts
then./setup-couchbase.sh
, typey
if prompted. See details below - You can now access couchbase via
localhost:8091
and login usingadmin:password
setup-couchbase.sh
This script will initialize and setup couchbase node and cluster using the couchbase-cli, hence, no manual setup is required. It will:
- Initialize the node with
admin:password
credentials - Initialize the cluster with only
data, index, query, fts
services enabled - Create
user:password
withfull admin
rights - Creates a bucket:
testBucket
- Creates a scope:
testScope
undertestBucket
- Creates a collection:
testCollection
undertestScope
Run
- Run
npm run dev
to start the feathers server
Local Development Setup
- Clone feathers-ottoman to your local directory
- Navigate to the root directory of
feathers-ottoman
- Run
npm link
- Navigate back to root directory of
feathers-ottoman-demo
- Run
npm link feathers-ottoman
Showcase
- Extend Schema - See
base.schema.ts
- Upload attachment via
attachments
service - See/public/index.html
- Navigate to
localhost:3030
, select your file (image) to upload, and the image on screen will change upon uploaded - This works by converting the uploaded file into
base64
string and store into the database
- Navigate to
Application
This application showcase how to implement and integrate features within feathers
and 3rd party libraries
such as CASL
, feathers-swagger
, ottoman
and so on
Services
This application has the following services
- User
- Workspace
- Post
- Comment
- Attachment