Video Link: Apache Kafka Crash Course | What is Kafka?
- Knowledge
- Node.JS Intermediate level
- Experience with designing distributed systems
- Tools
- Node.js: Download Node.JS
- Docker: Download Docker
- VsCode: Download VSCode
Video Link: Apache Kafka Crash Course | What is Kafka?
const express = require('express') | |
const app = express() | |
const path = require('path') | |
const multer = require('multer') | |
// For parsing application/x-www-form-urlencoded | |
app.use(express.urlencoded({ extended: true })); | |
// middlewares | |
app.use(express.json()) | |
// uploaded path |
+-- @sanity/[email protected] | |
+-- [email protected] | |
+-- [email protected] | |
+-- [email protected] | |
+-- [email protected] | |
+-- [email protected] | |
+-- [email protected] | |
`-- [email protected] |
git config --global user.name "chaudhuree" | |
git config --global user.email [email protected] |
import { useState, useEffect } from "react" | |
export const useFetch = (url) => { | |
const [data, setData] = useState(null) | |
const [isPending, setIsPending] = useState(false) | |
const [error, setError] = useState(null) | |
useEffect(() => { | |
// abort controller is used to avoid the error if anyone cancle | |
// fetching before it is completely done |
const express = require("express") | |
const http = require("http") | |
const app = express() | |
const server = http.createServer(app) | |
const io = require("socket.io")(server, { | |
cors: { | |
origin: "http://localhost:3000", | |
methods: [ "GET", "POST" ] | |
} | |
}) |
// eslintrc.js | |
module.exports = { | |
env: { | |
browser: true, | |
es6: true, | |
}, | |
extends: [ | |
'plugin:react/recommended', | |
'airbnb', | |
], |
// 💯 flexible localStorage hook | |
import * as React from 'react' | |
function useLocalStorageState( | |
key, | |
defaultValue = '', | |
// the = {} fixes the error we would get from destructuring when no argument was passed |