Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick StartCreate a new post1$ hexo new "My New Post" More info: Writing Run server1$ hexo server More info: Server Generate static files1$ hexo generate More info: Generating Deploy to remote sites1$ hexo deploy More info: Deployment
Getting Started with TypeScript
TypeScript has become the go-to language for building scalable JavaScript applications. In this guide, we’ll explore the basics and why you should consider adopting it. Why TypeScript?TypeScript adds static type checking to JavaScript, catching errors before they reach production. It’s not just about types — it’s about building confidence in your code. 123456789interface User { id: number name: string email: string}function greet(user: User): string { return `Hello, $...
Building REST APIs with Node.js
A practical guide to building clean, production-ready REST APIs using Node.js and Express. Project StructureA well-organized project is half the battle: 123456src/├── controllers/├── routes/├── middleware/├── models/└── index.ts Creating Your First Endpoint12345678910const express = require('express')const app = express()app.get('/api/users', (req, res) => { res.json({ users: [] })})app.listen(3000, () => { console.log('Server runni...
CSS Grid Layout Complete Guide
CSS Grid is the most powerful layout system in CSS. Let’s master it once and for all. The Basics123456.container { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: auto; gap: 1rem;} Grid Template AreasOne of Grid’s most elegant features: 123456789101112.layout { display: grid; grid-template-areas: "header header header" "sidebar main main" "footer footer footer";}.header { grid-area: header; ...
Docker for Frontend Developers
Docker isn’t just for backend engineers. Here’s why every frontend developer should learn it. Why Docker?“It works on my machine” is no longer an excuse. Docker ensures consistent environments across development, staging, and production. Your First Dockerfile12345678FROM node:20-alpineWORKDIR /appCOPY package*.json ./RUN npm ciCOPY . .RUN npm run buildEXPOSE 3000CMD ["npm", "start"] Docker Compose for Dev1234567891011version: '3.8'services: app: build: . ...
Understanding React Hooks
React Hooks changed how we write components. Let’s break down the most important ones and when to use them. useStateThe most basic hook — managing local state: 1234567const [count, setCount] = useState(0)return ( <button onClick={() => setCount(count + 1)}> Clicked {count} times </button>) useEffectSide effects made declarative: 123456789useEffect(() => { const controller = new AbortController() fetch('/api/data', { signal: c...