File uploads are one of the important parts of web applications now. Here I will show you how to upload files to Firebase Cloud Storage using Node.js and Vue.js.
For this, you need to have a firebase account. If you don’t have one, you can create one here. In the firebase console, create a new firebase project by clicking “Add new project”. Choose a name for your project. Firebase will then set up your project. For storing the files click on the “storage” button on the left navigation pane. Click “Get started” button, Then a modal will open which has the security rules for your cloud storage. You can know more about the security rules here. Click next and choose your location and click “Done”. …
In this story, we’re going to look at how to deploy a MEVN Stack application in Heroku. Here I’ll show deploying using Heroku CLI. You can also deploy your application from GitHub. I’m assuming you have a Heroku account and Heroku CLI installed in your system. If not, you can get the instructions to install Heroku CLI from here.
There are two ways you can deploy your app,
In this story, I’ll show how to deploy frontend and backend code together. We will serve the frontend from the backend server. I hope that you’ve created your Vue app. Now generate a production build of your Vue app. Run npm run biuild
inside your client directory, this will generate a production build of your Vue app, the dist
folder. …
Online payment has become a common thing now. There are many websites which use payment gateways. Sometimes we have to integrate the payment gateway on our website as well. Here I will show you how to integrate Paytm payment gateway on our website using Node.js. For the demo payment gateway visit, paytm-nodejs-demo.herokuapp.com
For using Paytm payment gateway, you’ll need a developer account. If you don’t have you can create one here. After getting into the account, click on developer settings at bottom of the left navigation pane. click on generate API keys, you’ll get your test keys. …
It’s common to show a 404 error page if a user goes to a wrong path that is not on our website. A 404 error page is used to show the user a not found page instead of a blank page.
Here I will show handling 404 error page in Vue router.
For the 404 error page, create a new component called NotFoundPage.vue
and add the following code.
<template>
<div>
<center>
<h1>404 not found</h1>
<h2>it seems you're in the wrong page</h2>
</center>
</div>
</template>
Now go to the router.js
file and add the following
import NotFoundPage from './compnents/NotFoundPage.vue{
path: '*',
component: NotFoundPage
}
we have added the *
character as the route for handling 404 errors. So if any user navigates to a wrong path, our NotFoundPage
will be rendered.
When I shifted to elementary os from Windows, One thing that felt bad for me is that sometimes the application we installed we cannot see the shortcut on the desktop or in the Applications menu. Here I will tell you how to add desktop shortcuts on Ubuntu or Debian based systems.
Adding a desktop shortcut is simple. All you need is to create .desktop
file at ~/.local/share/applications
or /usr/share/applications/
depending whether you want the shortcut to be accessible only by the local account or by everyone.
There are many websites which use payment gateways, Maybe you too want to integrate a payment gateway in your website. In one of my projects, I too wanted to integrate a payment gateway. Here I will show you how to integrate Paytm payment gateway in your website. For the demo app visit https://paytm-nodejs-demo.herokuapp.com
Note: This is an HTML form post integration method and it has been deprecated by Paytm. The flow is available for only existing integrations. Please follow this post for the updated payment gateway integration method.
For using Paytm payment gateway, you’ll need a developer account. If you don’t have you can create one here. After getting into our account, click on developer settings at bottom of the left navigation pane. click on generate API keys, you’ll get your test keys. …
In this tutorial, we will create a basic CRUD (Create Read Update Delete) application using Node.js. We will use Express.js for routing and MongoDB to store our data.
Node.js is an open-source, cross-platform, JavaScript runtime environment that executes JavaScript code outside of a browser.
Express.js is one of the popular web frameworks for Node.js. It simplifies routing, creating middleware etc.
MongoDB is one of the most popular databases used by modern apps. It is an opensource, cross-platform NoSQL database.
In this tutorial, we’re going to build an address book which has the option for creating, updating and deleting a user.
Before we start creating the app, we need to make sure that Node.js and MongoDB are installed. …