티스토리 뷰
반응형
- aws iot secure tunneling에서 localproxy를 테스트하기 위해 웹 서버를 띄울 방법을 모색하다 배우게 된 방법.
python3 -m http.server [port] [--directory 디렉토리 경로]
- port는 생략할 경우 default 8000번을 사용한다.
- --directory는 생략할 경우, 현재 디렉토리를 기준으로 실행된다.
- 활용 예시 (index.html을 만들어 초기 페이지를 작성)
[~] # index.html 내용 : this is ingnoh's http.server example!!!
[~] vi index.html
[~] python3 -m http.server
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...
127.0.0.1 - - [17/Mar/2021 10:56:22] "GET / HTTP/1.1" 200 -
[~] # 새 터미널 열기
[~] curl localhost:8000
this is ingnoh's http.server example!!!
[~]
댓글
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- JPA
- pgloader
- 코딩테스트
- Database
- terraform
- etc
- Linux
- Spring Cloud Config
- AWS
- Docker
- mysql
- javascript
- postgresql
- RancherDesktop
- jQuery
- Gradle
- shell
- spring boot
- JEST
- kotlin
- hashicorp
- Node.js
- react
- Git
- Java
- IntelliJ
- Vault
- Puppeteer
- eureka
- AWS IoT
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
글 보관함