본문 바로가기

보드팩토리 – SBC 커뮤니티

기술 Q&A

프로그래밍

라즈베리파이 CM4 에서 웹서버 띄우는 방법 도와주세요

작성자준혁 Lv.2 준회원 작성일 조회88 댓글3

본문

라즈베리파이 CM4 · Home Assistant OS 13 를 쓰고 있습니다. 전원은 12V 2A 어댑터 입니다.

apt 로 설치한 node 가 너무 오래된 버전이라 패키지가 설치되지 않습니다.

nvm 도 써 봤습니다.

const http = require('http');
http.createServer((req, res) => {
  res.end('hello');
}).listen(3000);

비슷한 경험 있으신 분 조언 부탁드립니다.

추천3

답변 3

해결됨
7 채택됨

질문한 사람이 채택한 답변

메모리가 적은 보드는 스왑을 늘린 뒤 설치하세요.

const http = require('http');
http.createServer((req, res) => {
  res.end('hello');
}).listen(3000);
소보로빵
4

NodeSource 저장소를 추가하면 최신 LTS 를 받을 수 있습니다.

초보파이
1

NodeSource 저장소를 추가하면 최신 LTS 를 받을 수 있습니다.

const http = require('http');
http.createServer((req, res) => {
  res.end('hello');
}).listen(3000);
보드팩토리