![Notepad++에서 현재 HTML 파일을 URL로 어떻게 시작할 수 있나요?](https://rvso.com/image/1395278/Notepad%2B%2B%EC%97%90%EC%84%9C%20%ED%98%84%EC%9E%AC%20HTML%20%ED%8C%8C%EC%9D%BC%EC%9D%84%20URL%EB%A1%9C%20%EC%96%B4%EB%96%BB%EA%B2%8C%20%EC%8B%9C%EC%9E%91%ED%95%A0%20%EC%88%98%20%EC%9E%88%EB%82%98%EC%9A%94%3F.png)
js
노드 서버 코드를 실행하는 파일이 있습니다 . ( notepad++
사용을 통해 NPPExec
)
좋아요 - 이제 서버가 가동되어 다음을 수신하고 있습니다.http://localhost:3030
그러나 탐색기 트리의 왼쪽 창이 있습니다.
목표 :
- 현재 파일 이름을 사용하세요.
- 상대 위치를 계산합니다.
c:\program Files (x86)\nodejs\public folder
- 앞에 추가
http://localhost:3030
- 달리다
chrome.exe "http://localhost:3030/" + "/angularjs-book-master/chapter2/amail/index.html"
그래서 저는 이것을 실행하고 싶습니다 :
NPP_RUN chrome.exe http://localhost:3030/(current file relative to nodejs
공공의folder)
주의사항 : URL로 실행하고 싶습니다..
그래서 내 예에서는 다음을 원합니다.
NPP_RUN chrome.exe http://localhost:3030/angularjs-book-master/chapter2/amail/index.html
index.html
현재 표시된 파일은 어디에 있습니까?
그런데 문제는 나에게 그런 능력이 없다는 것이다./angularjs-book-master/chapter2/amail/index.html
나는 이것 가지다가득한가치는 무엇인가 $(FILE_NAME)
?
file:///C:/Program%20Files%20(x86)/nodejs/public/angularjs-book-master/chapter1/order-form.html
그리고 이 문자열 전체가 필요하지 않습니다. 그것으로부터 잘라낼 솔루션 file:///C:/Program%20Files%20(x86)/nodejs/public/
도 괜찮을 것입니다.
또한 슬래시는 뒤쪽이어야 합니다.
간단히 말해서 :
나는 가지고있다NPP_RUN "chrome.exe" $(FILE_NAME)
그러나 이것은 다음과 같이 실행됩니다.
chrome.exe file:///C:/Program%20Files%20(x86)/nodejs/public/angularjs-book-master/chapter2/amail/index.html
하지만 나는 원한다오직this : (슬래시 주의)
chrome.exe http://localhost:3030/angularjs-book-master/chapter2/amail/index.html