๐๐ป Vite React๋ ์น์ฌ์ดํธ๋ฅผ ๋ง๋๋ ๊ฐ๋ฐ๋๊ตฌ์
๋๋ค.
Vite React is a development tool for creating websites.
๐๐ป Vite๋ React ํ๋ก์ ํธ์์ ๋งค์ฐ ์ธ๊ธฐ ์๋ ๋น๋ ๋๊ตฌ์ด์ ๊ฐ๋ฐ ์๋ฒ๋ผ๊ณ ํฉ๋๋ค.
Vite is said to be a very popular build tool and development server for React projects.
๐๐ป Vite๋ ํ๋์ค์ด๋ก “๋น ๋ฅด๋ค”๋ผ๋ ๋ป์ด๋๋๋ค. (๋ฐ์์ ์์ด๋ก “veet”์ด๋ผ๊ณ ์ฝ์)
Vite means “fast” in French. (It’s pronounced “veet” in English.)
๐๐ป ๊ฐ๋ฐ์๋ค์ด “๋นจ๋ฆฌ๋นจ๋ฆฌ ๊ฐ๋ฐํ๊ณ ์ถ๋ค”๋ ๋ง์์ ๋ด์์ ์ง์ ์ด๋ฆ์ด๋ผ๊ณ ํฉ๋๋ค.
It is said that the name was created by developers with the intention of “wanting to develop quickly.”
๐๐ป ์์ฆ ๊ฑฐ์ ๋ชจ๋ ์๋ก์ด React/Vue/Svelte ํ๋ก์ ํธ์์ Create React App ๋์ Vite + React ์กฐํฉ์ ๊ธฐ๋ณธ์ผ๋ก ์ ํํ๋ ์ถ์ธ์
๋๋ค.
Nowadays, almost every new React/Vue/Svelte project is choosing the Vite + React combination as the default instead of Create React App.
๐๐ป React๋ ์น์ฌ์ดํธ๋ ์ฑ์์ ํ๋ฉด(๋ฒํผ, ๋ชฉ๋ก, ์
๋ ฅ์ฐฝ, ๋์์ ํ๋ ์ด์ด ๋ฑ)์ ์์๊ณ ๋น ๋ฅด๊ฒ, ๊ทธ๋ฆฌ๊ณ ๊ด๋ฆฌํ๊ธฐ ์ฝ๊ฒ ๋ง๋๋ ๋๊ตฌ ์
๋๋ค.
React is a tool for creating beautiful, fast, and easy-to-maintain screens (buttons, lists, input fields, video players, etc.) on websites and apps.
๐๐ป ์น์ฌ์ดํธ ๊ฐ๋ฐ์ด ์ฃผ๋ ฅ ์
๋ฌด๊ฐ ์๋๋๋ผ๋ ์๋ฒ๋ฅผ ๊ฐ๋ฐํ๋ค๊ฐ ๋ณด๋ฉด ๊ด๋ฆฌ์ ํจ๋ ์ ๋๋ ์น์ ์ฌ์ฉํด์ผ ํ ์ผ์ด ์์ต๋๋ค.
Even if website development isn’t your main job, you’ll probably need to use the web for things like the admin panel when developing servers.
๐๐ป ๋ฐ์ดํฐ๋ฒ ์ด์ค๋ postgresql์ฌ์ฉ ํฉ๋๋ค.
The database uses PostgreSQL.
๐๐ป ์๋๋ MacOS์์ VIte React ์ค์นํ๋ ๋ฐฉ๋ฒ ์
๋๋ค.
Below is how to install VIte React on macOS.
# 1. ์ต์ Vite + React + TypeScript ํ๋ก์ ํธ ์์ฑ
# Create a modern Vite + React + TypeScript project
npm create vite@latest ReactExample -- --template react-ts
# ๋ง์ฝ yarn ์ฐ์ ๋ค๋ฉด:
# If you use yarn:
# yarn create vite ReactExample --template react-ts
# 2. ํ๋ก์ ํธ ํด๋๋ก ์ด๋
# Go to the project folder
cd ReactExample
# 3. ์์กด์ฑ ์ค์น
# Installing dependencies
npm install
# 4. ๊ฐ๋ฐ ์๋ฒ ์คํ (์๋์ผ๋ก ๋ธ๋ผ์ฐ์ ์ด๋ฆผ)
# Run the development server (browser opens automatically)
npm run dev
โ๏ธ ํฐ๋ฏธ๋์์ npm create vite@latest ReactExample — –template react-ts ์คํํ ๊ฒฝ์ฐ ์๋์ ๋ด์ฉ์ ์ฐธ์กฐ ํ์ธ์
If you run npm create vite@latest ReactExample — –template react-ts in the terminal, see below.
โ๏ธ “Use rolldown-vite (Experimental)? ” ์ด ๋ถ๋ถ์ yesํ๋ฉด ์์ ํ ๋ฒ์ ์ด ์๋ ์คํ์ ์ธ ์ต์ ๋ฒ์ ์ด ์ค์น๋ฉ๋๋ค.
“Use rolldown-vite (Experimental)?” If you answer yes to this part, the experimental latest version will be installed, not the stable version.
% npm create vite@latest ReactExample -- --template react-ts
> npx
> "create-vite" ReactExample --template react-ts
โ
โ Package name:
โ reactexample
โ
โ Use rolldown-vite (Experimental)?:
โ No
โ
โ Install with npm and start now?
โ โ Yes / โ No
โ๏ธ ์ํฐ๋ก ๊ณ์ ์งํํ๋ฉด ์๋ ์ฒ๋ผ ๋ฉ์ธ์ง๊ฐ ํฐ๋ฏธ๋์ ์ถ๋ ฅ๋ฉ๋๋ค.
If you continue by pressing Enter, a message like the one below will be printed in the terminal.
โ๏ธ๊ทธ๋ฌ๋ฉด ์ฌ๋ฌ๋ถ์ pc์์ ๋ธ๋ผ์ฐ์ ๋ฅผ ์ด๊ณ http://localhost:5173 ์ ์คํํฉ๋๋ค.
Then open a browser on your PC and go to http://localhost:5173.
VITE v7.3.1 ready in 257 ms
โ Local: http://localhost:5173/
โ Network: use --host to expose
โ press h + enter to show help
โ๏ธ ๋ชจ๋ ๊ณผ์ ์ด ์ ์์ ์ด๋ฉด ๋ธ๋ผ์ฐ์ ์์๋ค์๊ณผ ๊ฐ์ ํ๋ฉด์ ๋ณด์ค ์ ์์ต๋๋ค.
If everything went well, you will see the following screen in your browser:

โ๏ธ ํฐ๋ฏธ๋์์ ๊ฐ๋ฐ ์๋ฒ ์ค์ง ํ ๋๋ ctrl + cํ๋ฉด ๋ฉ๋๋ค.
To stop the development server in the terminal, just press ctrl + c.
๐๐ปpostgresql ์ค์น
install postgresql
โ๏ธ ํ๊ฒฝ๋ณ์์ค์ ๋ฐ ์คํ
Setting environment variables and running
— ํ๊ฒฝ๋ณ์ ์ค์ ์ด ๋์ด์์ง ์์ผ๋ฉด psql postgres ์ด ๋ช
๋ น์ด๋ฅผ ๋ชป์ฐพ์ต๋๋ค.
If the environment variable is not set, the psql postgres command will not be found.
— ํด๋น ๋๋ ํ ๋ฆฌ๋ก ์ด๋ํด์ ๋ช
๋ น์ด๋ฅผ ์คํํด์ค์ผํฉ๋๋ค.
You need to go to that directory and run the command.
— ํ๊ฒฝ๋ณ์๊ฐ ์ ๋ฑ๋ก๋๋ฉด psql postgres์ฒ๋ผ ๊ฐ๋จํ postgresql์ ์คํ ํ ์ ์์ต๋๋ค.
Once the environment variables are properly registered, you can run postgresql simply like psql postgres.
# Homebrew postgresql@17์ bin ๊ฒฝ๋ก ์ถ๊ฐ (Apple Silicon Mac ๊ธฐ์ค)
# Add the bin path for Homebrew postgresql@17 (based on Apple Silicon Mac)
echo 'export PATH="/opt/homebrew/opt/postgresql@17/bin:$PATH"' >> ~/.zshrc
# Intel Mac์ด๋ฉด /usr/local/opt/... ์ผ ์ ์์ โ ์๋๋ก ๋์ฒด
# If you have an Intel Mac, it may be /usr/local/opt/... โ Replace with below
# echo 'export PATH="/usr/local/opt/postgresql@17/bin:$PATH"' >> ~/.zshrc
# ๋ณ๊ฒฝ ์ ์ฉ (ํฐ๋ฏธ๋ ์ฌ์์ ์์ด ๋ฐ๋ก)
# Apply changes (immediately without restarting the terminal)
source ~/.zshrc
# ๋ค์ ํ์ธ
# check again
psql --version
# ์คํ ,Mac์์๋์ด๋ ๊ฒ ์คํํ๋ฉด ๋จ ์ํผ์ ์ ๊ฐ postgres๊ฐ ์๋.
# Run , on Mac, run like this. The superuser is not postgres.
psql postgres
โ๏ธ psql postgres ์คํ์ ๋ค์ ์ฒ๋ฆ ํ๋กฌํํธ๊ฐ ๋ฐ๋๋ฉด ์ ์์ ์ผ๋ก ์ค์น๋๊ฒ๋๋ค.
If the prompt changes to the following when running psql postgres, it has been installed successfully.
postgres=#