When developing node applications one of the common problems you may encounter is when uploading files. There are many ways to upload files in your node application. Multer can be used to upload files in your application and the uploaded files will be stored in the local storage. However if you want to deploy your program online then storing the files locally would not be a wise decision because the location you save it might not the same when the application is deployed in the cloud. Therefore a cloud based file storage solution is required. There are many solutions for…


Many of you might’ve come across a situation where you had to upload an image or any type of file to the server. Some of you might’ve succeeded while some of you might’ve failed. This blog will demonstrate how a library called Multer helps to store the files selected from the client side to a local storage and store the file name to the database so that file name could be used to locate the file in the local storage.

Multer

Multer is a node js middleware which helps to upload files. You have to make sure that your form…


Establishing a connection with MongoDB and React using Koa js

In this blog we will be looking at connecting the Mongo DB with React so that data manipulations could be done in the front-end with data stored in the local server.

dependencies you will need for the front-end:

axios will be used for http requests in this example

dependencies you will need for the back-end:

koa,@koa/cors, mongodb, koa-bodyparser

Let’s start with the backend

First you need to set up your back-end server with Koa


What is React Hooks?

This feature is available in the latest version of React which enables programmers to write the usual react programs and handle the state without converting them into class components. React programmers would know that state cannot be created without the help of classes and with React Hooks that could be made possible by using useStateHook within a functional based component. Hooks cannot be used within classes since it allows you to use it without the help of classes which will not allow to use the lifecycle methods such as componentDidMount, componentDidUpdate, componentWillUnmount etc. …


MongoDB Atlas

As many of you might know that MongoDB is a highly popular non-structured database used by many growing organizations such as Google, Adobe , eBay etc. MongoDB Atlas could be used to store your applications data in the cloud. Even though it is highly scalable and easy to manage, one of the main downsides of it is that, only 512mb of storage would be available to use for free and any extension of storage should be purchased.

Mongoose


In earlier days, JavaScript was used only in Front-end development and later on, modern frameworks were developed using JavaScript due to it’s scalable and powerful features. New frameworks are being developed using JavaScript as the foundation. With all the modern enhancements of this scripting language it is now possible to also work on backend development using JavaScript frameworks.

MERN stack is a complete JavaScript based technology which is more than enough to build a web application from front end to back end. Many developers are using this stack these days. There are other stacks out there such as MEAN, MEVN…

Arosh Segar

An undergraduate studying for a Bachelor's degree in Information Technology and Specializing in Software Engineering

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store