Node js(13)
-
[리눅스/안드로이드] node js
[ 목차 ] 안드로이드에 nodejs 설치하기 nodejs 실행하기 termux 에 nodejs 를 설치한다. 테스트할 코드를 작성해본다. (nodejs.org 에서 가져옴)// server.mjs import { createServer } from 'node:http'; const server = createServer((req, res) => { res.writeHead(200, { 'Content-Type': 'text/plain' }); res.end('Hello World!\n'); }); // starts a simple http server locally on port 3000 server.listen(3000, '127.0.0.1', () => { console.log('Listening ..
2024.06.16 -
nvm 으로 Node.js 설치하기
지금껏 nodejs.org 에 접속해서 바이너리를 직접 받아서 설치해왔는데 의외로 다른 방법들이 있었다. 맥 유저가 아니라서 brew 는 평생 쓸일 없을 것 같고 nvm (node version manager 라고 함) 을 curl 로 내려받은 후 버전을 골라서 설치할 수 있다. # NVM (Node Version Manager) 설치 curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash # 지정한 버전에 해당하는 Node.js 를 다운로드 한다. nvm install 20 # 설치된 node.js 버전을 확인한다. node -v # should print `v20.11.1` 분석 : curl -o- https://..
2024.03.20 -
Hook : useState
참고한 원문 : https://www.w3schools.com/react/react_hooks.asp React Hooks W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more. www.w3schools.com Hook (훅)은 React v16.8 에서 도입된 기능으로서 state 와 리액트의 여러가지 특성에 액세스할 수 있도록 지원하며 이로 인해 class (리액트 클래스)의 필요성을 없애버렸다. 당분간 c..
2023.04.07 -
conditional - {true} (O) "true" (X)
https://www.w3schools.com/react/react_conditional_rendering.asp React Conditional RenderingW3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.www.w3schools.com
2023.04.07 -
props
.
2023.04.07 -
React / React Router / Next.js / Gatsby
참고 리소스 : https://nextjs.org/learn/foundations/about-nextjs/what-is-nextjs React (리액트)는 인터랙티브한 사용자 인터페이스를 만들 때 쓰는 자바 스크립트 라이브러리이다. HTML 을 컴포넌트로 나눠서 관리할 수 있다. 컴포넌트를 초기화할 때 전달인자로 받을 수 있는 Props, 지속적으로 값을 변경할 수 있는 State, 아직 모르지만 Hook 이라는 변수개념이 존재한다. create-react-app 모듈로 Nodejs 프로젝트 구조를 생성할 수 있다. React 자체는 UI 에 한정되어 있어서 웹 애플리케이션을 만드려면 추가적인 모듈을 설치해주어야 한다. 그 중에 react-router-dom 도 있다. Next.js 는 또 무엇인고 하니..
2023.04.06