DEV Community 👩‍💻👨‍💻

Eric Bishard
Eric Bishard

Posted on

Setting up Ottoman

Requirements: NodeJS/NPM, Docker, VS Code

  1. 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

  2. Visit the locally running web admin at: localhost:8091

  3. Setup New Cluster with name & password

  4. Configure Disk, Memory, Services with at least: data, query, index services checked.

  5. 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 && cd intro-to-ottoman-v2 && npm install && code .
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

This should add documents to your travel bucket. Next we can run:

node findAirline.js
node findWithQueryBuilder.js
Enter fullscreen mode Exit fullscreen mode

Now let's update that file:

node updateAirline.js
Enter fullscreen mode Exit fullscreen mode

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!

Top comments (0)

🌚 Friends don't let friends browse without dark mode.

Sorry, it's true.