본문 바로가기

분류 전체보기

(28)
CentOS8 error [PHP] Fatal error: Call to undefined function json_decode() # yum install php-json Reforence https://stackoverflow.com/questions/18239405/php-fatal-error-call-to-undefined-function-json-decode
Javascript - Refused to execute script from 'http://XXX' because its MIME type ('application/octet-stream') is not executable, and strict MIME type checking is enabled. 에러 해결법 script 파일을 불러 오려고 하는데 MIME type checking is enabled. 라고 뜨면서 에러가 났다. 불러 오려는 파일 타입 Content-Type을 명시 해줘야 에러가 나지 않는다. 내 경우에는 타입을 type="application/octet-stream" 로 해줘야 했다. 아래에 MIME 타입의 전체 목록을 참고 해서 type="자신이 넣으려고 하는 MIME 타입" 을 넣어주자. developer.mozilla.org/ko/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types MIME 타입의 전체 목록 - HTTP | MDN MIME 타입의 전체 목록 다음은 일반적인 확장자로 정렬된, 문서 타입과 관련된 MIME 타입의 포괄적인 목록입니다..
node.js 에서 80 포트 사용하기 80port 접속 에러 env 파일에서 80port 로 설정 해서 사용 할 일이 있었다 8080port 로 설정하면 문제 없이 작동 하지만 80으로 설정하면 계속 에러가 났다 에러난 이유: node.js 에서 root 유저가 아니면 1024번 이하 포트는 리눅스 권한 설정이 필요하다 필자는 권한설정은 하지 않고 iptables 명령어를 사용하여 80port 로 들어오면 8080으로 접속할수 있게 설정하였다 iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080 위에 명령어 한줄이면 설정 가능하다 웹에서 접속할땐 80port 로 env 파일에는 8080port 로 설정 했다 . Reference tables -t nat -I PREROUTING -p ..
vscode 원격서버 ssh 연결해서 사용하기 vscode 가 없다면 다운받자 code.visualstudio.com/download Download Visual Studio Code - Mac, Linux, Windows Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows. Download Visual Studio Code to experience a redefined code editor, optimized for building and debugging modern web and cloud applications. code.visualstudio.com 좌측 Extension 창에서 Remote Development 를 찾아서 ..
remote: The project you were looking for could not be found 원격: 찾고 있는 프로젝트를 찾을 수 없습니다. 라고 나올 때 깃 클론을 하면 프로젝트를 찾을 수 없다는 에러가 나올때 git clone https://gitlab.com/{user_Id}/{repo_name}.git {userId}@ 를 앞에 추가 해주자 아래처럼 git clone https://{user_id}@gitlab.com/{user_id}/{repo_name}.git
node.js MVC 모델 참고 블로그 https://victorydntmd.tistory.com/category/%EC%9B%B9%20%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D/Node.js?page=3
1노드 시작하기 1.4 개발 환경설정하기 다운로드 | Node.js Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. nodejs.org 파일 내려받기 설치 후 $ node -v 로 버젼 확인 $ npm -v 도 확인 해본다 VS Code 설치하기 https://code.visualstudio.com/ Visual Studio Code - Code Editing. Redefined Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications. Visual Studio Code is fre..
get방식 post 방식 으로 데이터 전달 view -> server 데이터 전달시 1 req.body 2 req.query 3 req.params 1 의 경우 POST 로 데이터를 전달시 2 의 경우 GET 로 데이터를 전달시 http://xxx.xxx.xxx.xxx?name1=value1&name2=value2... console.log(req.query.name1); // value1 GET 방식 http://xxx.xxx.xxx.xxx?term=searchingBy ---------------------------------------------------- req = { query: { term: searchingBy } } const { query: { term: searchingBy } } = req; -----------------..