Skip to main content

Posts

Showing posts with the label VSCode

Creating a URL Shortener Deplyment on Azure (NodeJS) part-2

For reference to the previous post, please refer to this link : Connecting-to-our-Database Now let's head to the package that we added config in the npm install command, what it does is that it will look for default.json the file inside config (folder) which we created earlier that will consist of the global variables for our project. Now let's open that default.json file and place the below snippet in it: { "mongoURI": "<ConnectionStringHere>" } We'll replace the Connection String from the cluster's string from our Atlas Account (if you still don't have an account, click here to create one) After Logging in to the Atlas, create a free Cluster and add a database user in it Now use the below code in the db.js the file inside the config (folder): const mongoose = require('mongoose'); const config = require('config'); // Grab the Connection string URL from the default.json file const db = confi...

URL Shortener with GitHub-Actions and Azure (NodeJS) part-1

Creating a URL Shortener using NodeJS Prerequisite Understanding HTML CSS NodeJS Software Installed A text editor (Prefereably Microsoft Visual Studio Code ) or some other text editor NodeJS Runtime Hardware Resource Internet Connection 😂 Abstract Getting to know about how to deal with a NoSQL Database (here in this repo, we'll use MongoDB ). Deploying the webapp to Azure via GitHub Actions . Table of Content Resource Links Demos - 1-Setting-Backend - Setting-up-Directory-structure - Building-a-basic-Front-End - Connecting-to-our-Database - Setting-up-the-Routes-for-the-app - Pushing-Project-to-GitHub-and-Azure Demos We'll cover the making of this whole repository in small demos If you didn't covered the basic EJS project repo, then visit this link 1-Setting-up-the-Backend On the Command line navigate to the directory where you want to save the project on your system, then type in the following commands m...
Counter Widget