
서버 실행 유지 및 상태 확인을 위한 pm2 를 인스톨하고 사용하는 방법 1. 설치 npm install pm2 -g 2. 시작 # npm start // 기존 실행 pm2 start npm -- start // pm2로 실행 3. 모니터링 $ pm2 monitor [PM2 I/O] Using non-browser authentication. [PM2 I/O] Do you have a pm2.io account? (y/n) n [PM2 I/O] No problem ! We just need few informations to create your account [PM2 I/O] Please choose an username : {login user name} [PM2 I/O] Please choose a..
신규 환경에서 node를 실행했을 때 아래처럼 에러가 발생하는 경우가 있습니다 const utf8Encoder = new TextEncoder(); ^ ReferenceError: TextEncoder is not defined at Object. (/root/gits/private/senior-job/server/node_modules/whatwg-url/lib/encoding.js:2:21) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader..
특정 라이브러리에서 한글을 지원안하는데.. Key값을 모두 한글로 관리하고 있어서 어떻게 할까 고민하다가 한글을 단순히 영어로 바꿔주는 라이브러리가 없을까 하다가 찾았습니다 단순하게 자판기준으로 한글영문을 변경해줍니다 한글>영문: "티스토리" -> "xltmxhfl" 영문>한글: "tistory" -> "탼새교" 언어 별 지원 js - https://github.com/738/inko GitHub - 738/inko: 🇰🇷영타를 한글로, 한타를 영어로 변환해주는 자바스크립트 오픈소스 라이브러 🇰🇷영타를 한글로, 한타를 영어로 변환해주는 자바스크립트 오픈소스 라이브러리. Contribute to 738/inko development by creating an account on GitHub. github...

1. 사전 준비사항 주소(geo schema)를 처리할 수 있는 맵 관련 앱이 설치되어있어야 합니다 (네이버 지도, 구글 맵 등) 2. Intent 에서 geo schema를 호출하기 위해 AndroidManifest.xml에 queries 추가 3. Intent호출 val address = "서울 종로구 사직로 161" val intent = Intent(Intent.ACTION_VIEW).apply { data = Uri.parse("geo:0,0?q=${Uri.encode(address)}") } if (intent.resolveActivity(context.packageManager) != null) { context.startActivity(intent) }

Recyclerview (ListView) 작업 시 item 간 간격을 일정하게 주기위한 팁입니다 보통 이런 고민을 하게 됩니다 - item layout에 layout_marginTop을 설정함 -> 가장 마지막 item 의 아래 공백이 없음 - item layout에 layout_marginBottom을 설정함 -> 첫번째 item의 위 공백이 없음 - item layout에 layout_marginVertical을 설정함 -> 첫번째 위 공백과 마지막 아래 공백크기만 다름 이를 해결하기 위해 item의 margin은 Top이나 Bottom만 주고 Recyclerview의 padding을 설정합니다 위 코드처럼 paddingBottom을 주게되면, 마지막 아이템 아래쪽에 공백이 생깁니다. (paddin..

서버에 Get request로 User 리스트를 받는 예제입니다 (서버는 미리 구현되어있다고 가정) 0. 사전 정의 API 호출 주소: http://localhost/api/getUsers 응답 예제 [ { "name": "aaa", "age": 12, "addr": "addr1" }, { "name": "bbb", "age": 14, "addr": "addr2" }, { "name": "ccc", "age": 13, "addr": "addr3" } ] 1. 의존성 추가 (app/build.gradle) implementation 'com.squareup.retrofit2:retrofit:2.9.0' implementation 'com.squareup.retrofit2:converter-gson:2.9...
1. 설치 npm install mongoose 2. DB 연결 const mongoose = require('mongoose') mongoose.connect(`mongodb://{HOST}:{PORT}/{DB}`, { keepAlive: true, keepAliveInitialDelay: 30000 }) 3. schema 정의 및 모델 생성 const schema = mongoose.Schema({ name: String, age: Number, // ... }) const User = mongoose.model('user', schema) 4. find // 1. query 리턴 const query = User.find({}) // mongoose.Query 리턴 const doc = query...
- Total
- Today
- Yesterday