var mystring = "hello world test world"; var find = "world"; var regex = new RegExp(find, "g"); mystring.replace(regex, "" + find + ""); // highlight class위와 같은 코드에 highlight 클래스를 꾸미는 css 만 작성하면 된다. ex) .highlight { font-weight : bold; color:#FF0000; } 출처 : https://stackoverflow.com/questions/542232/in-javascript-how-can-i-perform-a-global-replace-on-string-with-a-variable-insi/21148153
Step 1관리자 권한으로 커맨드 창을 연다. 아래 명령어를 포트번호와 함께 입력한다netstat -ano | findstr :포트번호kill 하려고 하는 포트의 PID를 기억해둔다.Step 2아래 명령어를 PID 와 함께 실행한다taskkill /PID kill시킬PID /FP.S. 첫번째 명령어를 다시 실행하여 프로세스가 제대로 종료됐는지 확인할 수 있다. 출처 : https://stackoverflow.com/questions/39632667/how-to-kill-a-currently-using-port-on-localhost-in-windows
C:\Program Files\MongoDB 폴더안에 mongod.cfg 란 파일로 안의 내용을 넣는다 #데이터베이스 폴더storage: dbPath: "C:/Program Files/MongoDB/data"#mongodb 포트net: port: 27017#로그 파일systemLog: destination: file path: "C:/Program Files/MongoDB/logs/mongo.log" logAppend: true C:/Program Files/MongoDB/data 폴더와 C:/Program Files/MongoDB/logs 폴더는 미리 만들어 놓고 권한을 풀어야 한다 그리고 cmd 창에서 아래 명령어로 윈도우 서비스로 등록가능하다mongod --install --서비스이름 --서비스설명