분류 전체보기 126

Section 26: NoSQL & Website Backend Code - Using NoSQL In Our Website Code

The goals 💪🏻Planning Our Database Structure / Layout ✌🏻Performing CRUD operations in code 👍🏻Outputting database data Let's design our database Now let's dig in! If we write 'cls' command in mongosh, it means that we will clear everything. Here they made database 'blog' but since I already have it from different project, I will name this time 'nodeblog' and work with this. We practiced mongoDB la..

Section 25: An Introduction To NoSQL - Loose Relations

The goals 💪🏻How NoSQL Database Are Designed & Work ✌🏻Installing & Setting Up MongoDB 👍🏻Querying Data (CRUD Operations) The Idea Behind NoSQL Database Systems Store data without focusing on a strict schemas / data structures or relationships across multiple tables Let's try MongoDB So let's try with mongoDB We need to download it first. In my case, I already have downloaded MongoDB, and MongoDB C..

Section 24: SQL & Website Backend Code - Using SQL In Our Website Code

The goals 💪🏻How to connect to databases in code ✌🏻Performing CRUD operations in code 👍🏻Outputting database data Why On The Backend? We should NOT connect to a database from inside our frontend JavaScript code (i.e. from inside the browser). All our HTML, CSS & browser-side JS code is exposed to our website visitors (e.g. via browser dev tools). -Just to be clear: Such changes will NOT be mirrore..

Section 23: An Introduction To SQL - Can You Relate With It?

The goals 💪🏻How SQL Database Are Designed & Work ✌🏻Defining Data Schemas & Tables 👍🏻Querying Data (CRUD Operations) What is SQL? SQL Databases SQL stands for Structured Query Language and it therefore is not a database itself but only a query language you can use to interact with a specific type of database. SQL allows you to store, update, delete and of course retrieve data from relational data..

Section 22: Onwards To Databases: Beyond Simple File Storage

The goals 💪🏻What & Why? ✌🏻SQL vs NoSQL Databases Why do we need a database? Up to this point, we typically stored our (simple) data in files. SQL database has tables and it's structurized. We can find the specific data we want with a head row. We have standalone documents that contain all the data that belongs to a single document. In this case, if we can fetch more data with fewer queries. And ..

Section 21: Advanced JavaScript - For Backend & Browser (Frontend)

The goals 💪🏻More on Functions & Working with Objects / Arrays ✌🏻Reference vs Primitive Values 👍🏻Asynchronous Code When the function has a default value Then we should write this parameter as the last function greetUser(greetingPrefix, userName = 'user') { console.log(greetingPrefix + ' ' + userName + '!'); } greetUser('Hi', 'Max'); greetUser('Hello'); Special Values / Value Types in JavaScript R..

Section 20: Advanced Server-Side Code: Dynamic Routes, Error Handling, Patterns - Building a More Dynamic & Realistic Backend

The goals 💪🏻Dynamic Routes ✌🏻Custom Middleware & Error Handling 👍🏻Optimizing Our Code Why we need Dynamic Routes we can't make routes with speculation that how many data would be generated. In this case, we use dynamic routes so it can generate itself while user adding data res.render() If we pass two parameters in render, it means that we can use the second item in the first file and usually we..

Section 19: NodeJS & HTML Files - Working with Templates : Working With Static & Dynamic Files

The goals 💪🏻Sending HTML Files as Responses ✌🏻Serving Static Files 👍🏻Working With Dynamic Templates A project we are gonna build through this section res.send vs res.sendFile You can't use both res.send() and res.sendFile() in the same route and method because every request has only one response and each one is called first, that's your response. You're trying to pass a filename to render, but i..

Section 18: Easier NodeJS Development with ExpressJS: Using a Third-Party NodeJS Library

The goals 💪🏻What & Why? ✌🏻Request & Response Handling With Express 👍🏻Parsing & Storing User Input Node Package Manager (NPM) Try Express const express = require('express'); const app = express(); app.get('/currenttime', function(req, res) { res.send('' + new Date().toISOString() + ''); }); // localhost:3000/currenttime app.get('/', function(req, res) { res.send('Hello World!'); }); // localhost:..

Section 17: NodeJS Introduction: Getting Started With Writing Server-side Code

The goals 💪🏻What Exactly Is NodeJS & How Does It Work? ✌🏻Installing & Running NodeJS 👍🏻Writing Our First NodeJS-driven Website What is NodeJS? A JavaScript Runtime A tool for executing JavaScript code (outside of the browser) Can be installed on ANY computer and hence be used to write and execute server-side JavaScript code Working with the "Command Line" The "Command Line" is a text-based inter..