20
Setting up Ottoman
Requirements: NodeJS/NPM, Docker, VS Code
-
Setup the database:
docker pull couchbase:7.0.0-beta
docker run -d --name cb7 -p 8091-8096:8091-8096 -p 11210-11211:11210-11211 couchbase:7.0.0-beta Visit the locally running web admin at: localhost:8091
Setup New Cluster with name & password
Configure Disk, Memory, Services with at least: data, query, index services checked.
Add a bucket named
travel
With the database now up and running, let's clone a NodeJS project with some sample files we can use to learn Ottoman:
git clone https://github.com/httpJunkie/intro-to-ottoman-v2.git && cd intro-to-ottoman-v2 && npm install && code .
This will clone the NodeJS project, change directories into the project, install dependencies, and now VS Code will now be open.
With this in place we should be able to run the individual files one at at time:
node createAirline.js
This should add documents to your travel bucket. Next we can run:
node findAirline.js
node findWithQueryBuilder.js
Now let's update that file:
node updateAirline.js
You will notice a change in the document's callsign
This should give you a basic understanding of how to create an Ottoman project and get started!
20