Skip to main content

Posts

Showing posts from January, 2021

Why I switched to Brave browser from Google Chrome.

  I have used Google Chrome for the last 5–6 years, Chrome was the perfect browser and it has many features like syncing everything across the platform and devices, bookmarks, history, lots of extensions, password manager, auto-complete, developer options to name a few. All of these in with just a Google Id. Google ecosystem is very rich and useful. So why I decided to switch to  Brave  browser after giving it a trial for a month. Although chrome has everything, there were few issues that led me to hunt for a new browser and finally switched to Brave. Why Brave? 1. Chrome hogs the RAM “Aw ,  Snap! Google Chrome ran out of memory while trying to display this webpage.” I am sure you might have seen this message. This message appears when chrome has eaten all of the available RAM memory. I understand the reason behind Chrome using a lot of memory because of its architecture. It runs all the tabs in a separate process so that it can provide isolation. Modern sites and designers/developer

RESTful CRUD API with Deno, Oak and MongoDB

In this post, we are going to build a RESTful CRUD API with Deno, Oak and MongoDB as database. In the previous article, we discussed how to install deno in your local machine and start using Deno. If you haven’t read that article, please read the article below and install the deno first. Getting started with Deno, Your first app Hello Deno. Let's install Deno. Deno ships as a single executable with no dependencies. You can install it using the installers… blog.shashi.dev After installing the Deno, we will start building the restful crud api’s. We will use o ak  microframework. Some of the other deno microframeworks are: abc deno-drash deno-express oak pogo servest In this article we will be using oak, which is inspired by koa. Setting up the project: Create a new directory called  restful-api-deno mkdir restful-api-deno 2. After c r eating the directory just  cd  into the directory cd restful-api-deno 3. Create a new file  server.ts  and paste the following code init. import { Ap

Getting started with Deno, Your first app Hello Deno.

Let’s install Deno. Deno ships as a single executable with no dependencies. You can install it using the installers below, or download a release binary from the  releases page . Installing deno in Linux: curl -fsSL https://deno.land/x/install/install.sh | sh Set the path export DENO_INSTALL="/home/user/.deno" export PATH="$DENO_INSTALL/bin:$PATH" Once its done lets verify the installation. deno --version and you should be able to get the deno version. Congratulations, deno is installed. Now as a tradition we will start with Hello Deno project. Create a folder called hello-deno. mkdir hello-deno cd hello-deno Create a file index.js touch index.js Put the following content in the index.js console.log('Hello Deno'); Now we can run our program from terminal. deno run index.js You shou l d be able to get the following output Hello Deno Congrats. You have just completed your Hello World with Deno. We will create more real-life deno projects in the next article.